WP Maintenance - Version 2.6.1

Version Description

Cette version est stable / This version is stable

=

Download this release

Release Info

Developer Florent73
Plugin Icon 128x128 WP Maintenance
Version 2.6.1
Comparing to
See all releases

Code changes from version 2.6 to 2.6.1

Files changed (3) hide show
  1. readme.txt +5 -2
  2. wp-maintenance-admin.php +29 -5
  3. wp-maintenance.php +49 -17
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: wordpress maintenance plugin
5
  Requires at least: 3.0
6
  Tested up to: 4.3
7
- Stable tag: 2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,11 +65,14 @@ Oui mais merci de me soumettre les modifications souhaitées afin de mettre à j
65
 
66
  == Upgrade Notice ==
67
 
68
- = 2.6 =
69
  Cette version est stable / This version is stable
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 2.6 =
74
  * Nouvelle version du plugin. Il sera peut-être nécessaire de désinstaller/réinstaller le plugin / New version, perhaps need uninstall/install the plugin
75
 
4
  Tags: wordpress maintenance plugin
5
  Requires at least: 3.0
6
  Tested up to: 4.3
7
+ Stable tag: 2.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
65
 
66
  == Upgrade Notice ==
67
 
68
+ = 2.6.1 =
69
  Cette version est stable / This version is stable
70
 
71
  == Changelog ==
72
 
73
+ = 2.6.1 =
74
+ * Correction des erreurs php notices / Fixed bug php notice (undefined index)
75
+
76
  = 2.6 =
77
  * Nouvelle version du plugin. Il sera peut-être nécessaire de désinstaller/réinstaller le plugin / New version, perhaps need uninstall/install the plugin
78
 
wp-maintenance-admin.php CHANGED
@@ -5,7 +5,7 @@ if(!defined('WPM_PLUGIN_URL')) { define('WPM_PLUGIN_URL', WP_CONTENT_URL.'/plugi
5
  if(!defined('WPM_ICONS_URL')) { define('WPM_ICONS_URL', WP_CONTENT_URL.'/plugins/wp-maintenance/socialicons/'); }
6
 
7
  /* Update des paramètres */
8
- if($_POST['action'] == 'update' && $_POST["wp_maintenance_settings"]!='') {
9
  update_option('wp_maintenance_settings', $_POST["wp_maintenance_settings"]);
10
  update_option('wp_maintenance_style', $_POST["wp_maintenance_style"]);
11
  update_option('wp_maintenance_limit', $_POST["wp_maintenance_limit"]);
@@ -20,6 +20,7 @@ if($_POST['action'] == 'update' && $_POST["wp_maintenance_settings"]!='') {
20
  if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
21
  $paramMMode = get_option('wp_maintenance_settings');
22
 
 
23
  if( !isset($paramMMode['font_title_size']) ) { $paramMMode['font_title_size'] = 40; }
24
  if( !isset($paramMMode['font_title_style']) ) { $paramMMode['font_title_style'] = 'normal'; }
25
  if( !isset($paramMMode['font_title_weigth']) ) { $paramMMode['font_title_weigth'] = 'normal'; }
@@ -33,7 +34,30 @@ if( !isset($paramMMode['font_bottom_style']) ) { $paramMMode['font_bottom_style'
33
  if( !isset($paramMMode['font_cpt']) ) { $paramMMode['font_cpt'] = 'Acme'; }
34
  if( !isset($paramMMode['date_cpt_size']) ) { $paramMMode['date_cpt_size'] = 72; }
35
  if( !isset($paramMMode['newletter_font_weigth']) ) { $paramMMode['newletter_font_weigth'] = 'normal'; }
36
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  // Récupère les Rôles et capabilités
38
  if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
39
  $paramLimit = get_option('wp_maintenance_limit');
@@ -107,17 +131,17 @@ if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
107
 
108
  <li>
109
  <h3><?php _e('Enable Google Analytics:', 'wp-maintenance'); ?></h3>
110
- <input type= "checkbox" name="wp_maintenance_settings[analytics]" value="1" <?php if($paramMMode['analytics']==1) { echo ' checked'; } ?>><?php _e('Yes', 'wp-maintenance'); ?><br /><br />
111
  <?php _e('Enter your Google analytics tracking ID here:', 'wp-maintenance'); ?><br />
112
  <input type="text" name="wp_maintenance_settings[code_analytics]" value="<?php echo stripslashes(trim($paramMMode['code_analytics'])); ?>"><br />
113
  <?php _e('Enter your domain URL:', 'wp-maintenance'); ?><br />
114
- <input type="text" name="wp_maintenance_settings[domain_analytics]" value="<?php if($paramMMode['domain_analytics']=='') { echo $_SERVER['SERVER_NAME']; } else { echo stripslashes(trim($paramMMode['domain_analytics'])); } ?>">
115
  </li>
116
  <li>&nbsp;</li>
117
 
118
  <li>
119
  <h3><?php _e('Enable Social Networks:', 'wp-maintenance'); ?></h3>
120
- <input type= "checkbox" name="wp_maintenance_social_options[enable]" value="1" <?php if($paramSocialOption['enable']==1) { echo ' checked'; } ?>><?php _e('Yes', 'wp-maintenance'); ?><br /><br />
121
  <?php _e('Enter text for the title icons:', 'wp-maintenance'); ?>
122
  <input type="text" name="wp_maintenance_social_options[texte]" value="<?php if($paramSocialOption['texte']=='') { _e('Follow me on', 'wp-maintenance'); } else { echo stripslashes(trim($paramSocialOption['texte'])); } ?>" /><br /><br />
123
  <!-- Liste des réseaux sociaux -->
5
  if(!defined('WPM_ICONS_URL')) { define('WPM_ICONS_URL', WP_CONTENT_URL.'/plugins/wp-maintenance/socialicons/'); }
6
 
7
  /* Update des paramètres */
8
+ if( isset($_POST['action']) && $_POST['action'] == 'update' && $_POST["wp_maintenance_settings"]!='') {
9
  update_option('wp_maintenance_settings', $_POST["wp_maintenance_settings"]);
10
  update_option('wp_maintenance_style', $_POST["wp_maintenance_style"]);
11
  update_option('wp_maintenance_limit', $_POST["wp_maintenance_limit"]);
20
  if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
21
  $paramMMode = get_option('wp_maintenance_settings');
22
 
23
+ if( !isset($paramMMode['titre_maintenance']) ) { $paramMMode['titre_maintenance'] = ''; }
24
  if( !isset($paramMMode['font_title_size']) ) { $paramMMode['font_title_size'] = 40; }
25
  if( !isset($paramMMode['font_title_style']) ) { $paramMMode['font_title_style'] = 'normal'; }
26
  if( !isset($paramMMode['font_title_weigth']) ) { $paramMMode['font_title_weigth'] = 'normal'; }
34
  if( !isset($paramMMode['font_cpt']) ) { $paramMMode['font_cpt'] = 'Acme'; }
35
  if( !isset($paramMMode['date_cpt_size']) ) { $paramMMode['date_cpt_size'] = 72; }
36
  if( !isset($paramMMode['newletter_font_weigth']) ) { $paramMMode['newletter_font_weigth'] = 'normal'; }
37
+ if( !isset($paramMMode['code_analytics']) ) { $paramMMode['code_analytics'] = ''; }
38
+ if( !isset($paramMMode['domain_analytics']) ) { $paramMMode['domain_analytics'] = $_SERVER['SERVER_NAME']; }
39
+ if( !isset($paramMMode['text_bt_maintenance']) ) { $paramMMode['text_bt_maintenance'] = ''; }
40
+ if( !isset($paramMMode['title_newletter']) ) { $paramMMode['title_newletter'] = ''; }
41
+ if( !isset($paramMMode['code_newletter']) ) { $paramMMode['code_newletter'] = ''; }
42
+ if( !isset($paramMMode['message_cpt_fin']) ) { $paramMMode['message_cpt_fin'] = ''; }
43
+ if( !isset($paramMMode['headercode']) ) { $paramMMode['headercode'] = ''; }
44
+ if( !isset($paramMMode['color_bg_header']) ) { $paramMMode['color_bg_header'] = ''; }
45
+ if( !isset($paramMMode['color_cpt']) ) { $paramMMode['color_cpt'] = '#333333'; }
46
+ if( !isset($paramMMode['color_cpt_bg']) ) { $paramMMode['color_cpt_bg'] = ''; }
47
+ if( !isset($paramMMode['b_enable_image']) ) { $paramMMode['b_enable_image'] = 0; }
48
+ if( !isset($paramMMode['b_image']) ) { $paramMMode['b_image'] = ''; }
49
+ if( !isset($paramMMode['b_pattern']) ) { $paramMMode['b_pattern'] = ''; }
50
+ if( !isset($paramMMode['b_fixed_image']) ) { $paramMMode['b_fixed_image'] = 'fixed'; }
51
+ if( !isset($paramMMode['b_repeat_image']) ) { $paramMMode['b_repeat_image'] = 'repeat'; }
52
+ if( !isset($paramMMode['date_cpt_jj']) ) { $paramMMode['date_cpt_jj'] = date('d'); }
53
+ if( !isset($paramMMode['date_cpt_aa']) ) { $paramMMode['date_cpt_aa'] = date('Y')+1; }
54
+ if( !isset($paramMMode['date_cpt_hh']) ) { $paramMMode['date_cpt_hh'] = date('h'); }
55
+ if( !isset($paramMMode['date_cpt_mn']) ) { $paramMMode['date_cpt_mn'] = date('m'); }
56
+ if( !isset($paramMMode['active_cpt_s']) ) { $paramMMode['active_cpt_s'] = 0; }
57
+ if( !isset($paramMMode['disable']) ) { $paramMMode['disable'] = 0; }
58
+ if( !isset($paramMMode['pageperso']) ) { $paramMMode['pageperso'] = 0; }
59
+ if( !isset($paramMMode['newletter']) ) { $paramMMode['newletter'] = 0; }
60
+
61
  // Récupère les Rôles et capabilités
62
  if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
63
  $paramLimit = get_option('wp_maintenance_limit');
131
 
132
  <li>
133
  <h3><?php _e('Enable Google Analytics:', 'wp-maintenance'); ?></h3>
134
+ <input type= "checkbox" name="wp_maintenance_settings[analytics]" value="1" <?php if( isset($paramMMode['analytics']) && $paramMMode['analytics'] ==1) { echo ' checked'; } ?>><?php _e('Yes', 'wp-maintenance'); ?><br /><br />
135
  <?php _e('Enter your Google analytics tracking ID here:', 'wp-maintenance'); ?><br />
136
  <input type="text" name="wp_maintenance_settings[code_analytics]" value="<?php echo stripslashes(trim($paramMMode['code_analytics'])); ?>"><br />
137
  <?php _e('Enter your domain URL:', 'wp-maintenance'); ?><br />
138
+ <input type="text" name="wp_maintenance_settings[domain_analytics]" value="<?php echo stripslashes(trim($paramMMode['domain_analytics'])); ?>">
139
  </li>
140
  <li>&nbsp;</li>
141
 
142
  <li>
143
  <h3><?php _e('Enable Social Networks:', 'wp-maintenance'); ?></h3>
144
+ <input type= "checkbox" name="wp_maintenance_social_options[enable]" value="1" <?php if( isset($paramSocialOption['enable']) && $paramSocialOption['enable']==1) { echo ' checked'; } ?>><?php _e('Yes', 'wp-maintenance'); ?><br /><br />
145
  <?php _e('Enter text for the title icons:', 'wp-maintenance'); ?>
146
  <input type="text" name="wp_maintenance_social_options[texte]" value="<?php if($paramSocialOption['texte']=='') { _e('Follow me on', 'wp-maintenance'); } else { echo stripslashes(trim($paramSocialOption['texte'])); } ?>" /><br /><br />
147
  <!-- Liste des réseaux sociaux -->
wp-maintenance.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Le plugin WP Maintenance vous permet de mettre votre site en attente le temps pour vous de faire une maintenance ou du lancement de votre site. Personnalisez cette page de maintenance avec une image, un compte à rebours, etc... / 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...
7
  * Author: Florent Maillefaud
8
  * Author URI: http://www.restezconnectes.fr/
9
- * Version: 2.6
10
  * Text Domain: wp-maintenance
11
  * Domain Path: /languages/
12
  */
@@ -14,6 +14,7 @@
14
 
15
  /*
16
  Change Log
 
17
  07/08/2015 - Nouvelle version du plugin
18
  18/04/2015 - Fixed a bug on the end of message counter
19
  16/04/2015 - Résolution de divers bug CSS
@@ -72,7 +73,7 @@ function wpm_make_multilang() {
72
  }
73
 
74
  /* Ajoute la version dans les options */
75
- define('WPM_VERSION', '2.6');
76
  $option['wp_maintenance_version'] = WPM_VERSION;
77
  if( !get_option('wp_maintenance_version') ) {
78
  add_option('wp_maintenance_version', $option);
@@ -124,10 +125,12 @@ function wpm_get_roles() {
124
  function wpm_add_admin() {
125
 
126
  $wp_maintenanceAdminOptions = array(
 
127
  'color_bg' => "#f1f1f1",
128
  'color_txt' => '#888888',
129
  'color_bg_bottom' => '#333333',
130
  'color_text_bottom' => '#FFFFFF',
 
131
  'text_maintenance' => __('This site is down for maintenance', 'wp-maintenance'),
132
  'userlimit' => 'administrator',
133
  'image' => WP_PLUGIN_URL.'/wp-maintenance/images/default.png',
@@ -141,6 +144,24 @@ function wpm_add_admin() {
141
  'enable_demo' => 0,
142
  'color_text_button' => '#FFFFFF',
143
  'color_button' => '#1e73be',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  );
145
  $getMaintenanceSettings = get_option('wp_maintenance_settings');
146
  if (!empty($getMaintenanceSettings)) {
@@ -238,7 +259,7 @@ function wpm_analytics_shortcode( $atts ) {
238
  ), $atts )
239
  );
240
 
241
- if($enable==1 && $code!='') {
242
  return "<script>
243
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
244
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -262,6 +283,7 @@ function wpm_social_shortcode( $atts ) {
262
  $paramSocial = get_option('wp_maintenance_social');
263
  $paramSocialOption = get_option('wp_maintenance_social_options');
264
  $countSocial = wpm_array_value_count($paramSocial);
 
265
  // Si on est en mobile on réduit les icones
266
  if ( wp_is_mobile() ) {
267
  $paramSocialOption['size'] = 24;
@@ -281,7 +303,7 @@ function wpm_social_shortcode( $atts ) {
281
  $srcIcon = WP_CONTENT_URL.'/plugins/wp-maintenance/socialicons/'.$paramSocialOption['size'].'x'.$paramSocialOption['size'].'/';
282
  $iconSize = '';
283
  }
284
- if($paramSocialOption['enable']==1 && $countSocial>=1) {
285
  $content .= '<div id="wpm-social-footer" class="wpm_social"><ul class="wpm_horizontal">';
286
  foreach($paramSocial as $socialName=>$socialUrl) {
287
  if($socialUrl!='') {
@@ -305,6 +327,13 @@ function wpm_maintenance_mode() {
305
  if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
306
  $paramMMode = get_option('wp_maintenance_settings');
307
 
 
 
 
 
 
 
 
308
  if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
309
  $paramLimit = get_option('wp_maintenance_limit');
310
  $statusActive = get_option('wp_maintenance_active');
@@ -331,7 +360,7 @@ function wpm_maintenance_mode() {
331
  }
332
 
333
  /* Si on désactive le mode maintenance en fin de compte à rebours */
334
- if($paramMMode['disable']==1 && $statusActive == 1) {
335
 
336
  $dateNow = strtotime(date("d-m-Y H:i:s")) + 3600 * get_option('gmt_offset');
337
  $dateFinCpt = strtotime(date($paramMMode['date_cpt_jj'].'-'.$paramMMode['date_cpt_mm'].'-'.$paramMMode['date_cpt_aa'].' '.$paramMMode['date_cpt_hh'].':'.$paramMMode['date_cpt_mn'].':'.$paramMMode['date_cpt_ss']));
@@ -397,12 +426,12 @@ function wpm_maintenance_mode() {
397
  $addFormLogin = '';
398
  $newLetter = '';
399
 
400
- if($paramMMode['analytics']) {
401
  $CodeAnalytics = do_shortcode('[wpm_analytics enable="'.$paramMMode['analytics'].'"]');
402
  } else {
403
  $CodeAnalytics = '';
404
  }
405
- if($paramMMode['headercode']) {
406
  $HeaderCode = stripslashes($paramMMode['headercode']);
407
  } else {
408
  $HeaderCode = '';
@@ -418,7 +447,8 @@ function wpm_maintenance_mode() {
418
  $BottomSocialIcons = '';
419
  }
420
  if($paramMMode['image']) {
421
- $LogoImage = '<div id="logo"><img src="'.$paramMMode['image'].'" width="'.$paramMMode['image_width'].'" height="'.$paramMMode['image_height'].'" alt="'.get_bloginfo( 'name', 'display' ).' '.get_bloginfo( 'description', 'display' ).'" title="'.get_bloginfo( 'name', 'display' ).' '.get_bloginfo( 'description', 'display' ).'" /></div>';
 
422
  } else {
423
  $LogoImage = '';
424
  }
@@ -437,11 +467,10 @@ function wpm_maintenance_mode() {
437
  } else {
438
  $Texte = '';
439
  }
 
440
  if($paramMMode['newletter']==1 && $paramMMode['code_newletter']!='') {
441
  $nameNl = strpos($paramMMode['code_newletter'], 'wysija_form');
442
- if($nameNl===false) {
443
- $wysijaStyle = '/* no WYSIJA Style */';
444
- } else {
445
  //$wysijaStyle = 'STYLEOK';
446
  $wysijaRemplacements = array (
447
  "#_COLORTXT" => $paramMMode['color_field_text'],
@@ -456,10 +485,11 @@ function wpm_maintenance_mode() {
456
  }
457
  $newLetter = '<div class="wpm_newletter">'.stripslashes($paramMMode['title_newletter']).''.do_shortcode(stripslashes($paramMMode['code_newletter'])).'</div>';
458
  }
459
-
 
 
460
  if($paramMMode['b_image'] && $paramMMode['b_enable_image']==1) {
461
  if($paramMMode['b_repeat_image']=='') { $paramMMode['b_repeat_image'] = 'repeat'; }
462
- $optionBackground = '';
463
  if(isset($paramMMode['b_fixed_image']) && $paramMMode['b_fixed_image']==1) {
464
  $optionBackground = 'background-attachment:fixed;';
465
  }
@@ -513,10 +543,12 @@ body {
513
  }
514
 
515
  /*********** AJOUT DU STYLE SUIVANT LES PARAMETRES *********/
516
- $wpmFonts .= '
517
- @import url(https://fonts.googleapis.com/css?family='.str_replace(' ', '+', $paramMMode['font_title']).'|'.str_replace(' ', '+',$paramMMode['font_text']).'|'.str_replace(' ', '+',$paramMMode['font_text_bottom']).'|'.str_replace(' ', '+',$paramMMode['font_cpt']).'|'.str_replace(' ', '+',$paramMMode['newletter_font_text']).');
518
- ';
519
-
 
 
520
 
521
  $wpmStyle .= ''.$addBImage.'
522
  .wpm_social_icon {
6
  * Description: Le plugin WP Maintenance vous permet de mettre votre site en attente le temps pour vous de faire une maintenance ou du lancement de votre site. Personnalisez cette page de maintenance avec une image, un compte à rebours, etc... / 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...
7
  * Author: Florent Maillefaud
8
  * Author URI: http://www.restezconnectes.fr/
9
+ * Version: 2.6.1
10
  * Text Domain: wp-maintenance
11
  * Domain Path: /languages/
12
  */
14
 
15
  /*
16
  Change Log
17
+ 02/09/2015 - Correction notice php (undefined index)
18
  07/08/2015 - Nouvelle version du plugin
19
  18/04/2015 - Fixed a bug on the end of message counter
20
  16/04/2015 - Résolution de divers bug CSS
73
  }
74
 
75
  /* Ajoute la version dans les options */
76
+ define('WPM_VERSION', '2.6.1');
77
  $option['wp_maintenance_version'] = WPM_VERSION;
78
  if( !get_option('wp_maintenance_version') ) {
79
  add_option('wp_maintenance_version', $option);
125
  function wpm_add_admin() {
126
 
127
  $wp_maintenanceAdminOptions = array(
128
+ 'enable' => 0,
129
  'color_bg' => "#f1f1f1",
130
  'color_txt' => '#888888',
131
  'color_bg_bottom' => '#333333',
132
  'color_text_bottom' => '#FFFFFF',
133
+ 'titre_maintenance' => __('This site is down for maintenance', 'wp-maintenance'),
134
  'text_maintenance' => __('This site is down for maintenance', 'wp-maintenance'),
135
  'userlimit' => 'administrator',
136
  'image' => WP_PLUGIN_URL.'/wp-maintenance/images/default.png',
144
  'enable_demo' => 0,
145
  'color_text_button' => '#FFFFFF',
146
  'color_button' => '#1e73be',
147
+ 'image_width' => 250,
148
+ 'image_height' => 100,
149
+ 'newletter' => 0,
150
+ 'active_cpt' => 0,
151
+ 'newletter_font_text' => '#333333',
152
+ 'newletter_size' => 18,
153
+ 'newletter_font_style' => '',
154
+ 'newletter_font_weigth' => 'normal',
155
+ 'newletter_font_text' => 20,
156
+ 'font_title_style' => '',
157
+ 'font_text_style' => '',
158
+ 'font_bottom_style' => '',
159
+ 'title_newletter' => '',
160
+ 'code_newletter' => '',
161
+ 'code_analytics' => '',
162
+ 'domain_analytics' => $_SERVER['SERVER_NAME'],
163
+ 'text_bt_maintenance' => '',
164
+
165
  );
166
  $getMaintenanceSettings = get_option('wp_maintenance_settings');
167
  if (!empty($getMaintenanceSettings)) {
259
  ), $atts )
260
  );
261
 
262
+ if( isset($enable) && $enable==1 && $code!='') {
263
  return "<script>
264
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
265
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
283
  $paramSocial = get_option('wp_maintenance_social');
284
  $paramSocialOption = get_option('wp_maintenance_social_options');
285
  $countSocial = wpm_array_value_count($paramSocial);
286
+ $content = '';
287
  // Si on est en mobile on réduit les icones
288
  if ( wp_is_mobile() ) {
289
  $paramSocialOption['size'] = 24;
303
  $srcIcon = WP_CONTENT_URL.'/plugins/wp-maintenance/socialicons/'.$paramSocialOption['size'].'x'.$paramSocialOption['size'].'/';
304
  $iconSize = '';
305
  }
306
+ if( isset($paramSocialOption['enable']) && $paramSocialOption['enable']==1 && $countSocial>=1) {
307
  $content .= '<div id="wpm-social-footer" class="wpm_social"><ul class="wpm_horizontal">';
308
  foreach($paramSocial as $socialName=>$socialUrl) {
309
  if($socialUrl!='') {
327
  if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
328
  $paramMMode = get_option('wp_maintenance_settings');
329
 
330
+ if($paramMMode) {
331
+ foreach($paramMMode as $var =>$value) {
332
+ $paramMMode[$var] = ''.$value.'';
333
+ echo '$paramMMode['.$var.'] = "'.$value.'"<br />';
334
+ }
335
+ }
336
+
337
  if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
338
  $paramLimit = get_option('wp_maintenance_limit');
339
  $statusActive = get_option('wp_maintenance_active');
360
  }
361
 
362
  /* Si on désactive le mode maintenance en fin de compte à rebours */
363
+ if( ( isset($paramMMode['disable']) && $paramMMode['disable']==1 ) && $statusActive == 1 ) {
364
 
365
  $dateNow = strtotime(date("d-m-Y H:i:s")) + 3600 * get_option('gmt_offset');
366
  $dateFinCpt = strtotime(date($paramMMode['date_cpt_jj'].'-'.$paramMMode['date_cpt_mm'].'-'.$paramMMode['date_cpt_aa'].' '.$paramMMode['date_cpt_hh'].':'.$paramMMode['date_cpt_mn'].':'.$paramMMode['date_cpt_ss']));
426
  $addFormLogin = '';
427
  $newLetter = '';
428
 
429
+ if( isset($paramMMode['analytics']) && $paramMMode['analytics']!='') {
430
  $CodeAnalytics = do_shortcode('[wpm_analytics enable="'.$paramMMode['analytics'].'"]');
431
  } else {
432
  $CodeAnalytics = '';
433
  }
434
+ if( isset($paramMMode['headercode']) && $paramMMode['headercode']!='') {
435
  $HeaderCode = stripslashes($paramMMode['headercode']);
436
  } else {
437
  $HeaderCode = '';
447
  $BottomSocialIcons = '';
448
  }
449
  if($paramMMode['image']) {
450
+ list($logoWidth, $logoHeight, $logoType, $logoAttr) = getimagesize($paramMMode['image']);
451
+ $LogoImage = '<div id="logo"><img src="'.$paramMMode['image'].'" width="'.$logoWidth.'" height="'.$logoHeight.'" alt="'.get_bloginfo( 'name', 'display' ).' '.get_bloginfo( 'description', 'display' ).'" title="'.get_bloginfo( 'name', 'display' ).' '.get_bloginfo( 'description', 'display' ).'" /></div>';
452
  } else {
453
  $LogoImage = '';
454
  }
467
  } else {
468
  $Texte = '';
469
  }
470
+ $wysijaStyle = '/* no WYSIJA Style */';
471
  if($paramMMode['newletter']==1 && $paramMMode['code_newletter']!='') {
472
  $nameNl = strpos($paramMMode['code_newletter'], 'wysija_form');
473
+ if($nameNl===true) {
 
 
474
  //$wysijaStyle = 'STYLEOK';
475
  $wysijaRemplacements = array (
476
  "#_COLORTXT" => $paramMMode['color_field_text'],
485
  }
486
  $newLetter = '<div class="wpm_newletter">'.stripslashes($paramMMode['title_newletter']).''.do_shortcode(stripslashes($paramMMode['code_newletter'])).'</div>';
487
  }
488
+
489
+ $optionBackground = '';
490
+ $addBImage = '';
491
  if($paramMMode['b_image'] && $paramMMode['b_enable_image']==1) {
492
  if($paramMMode['b_repeat_image']=='') { $paramMMode['b_repeat_image'] = 'repeat'; }
 
493
  if(isset($paramMMode['b_fixed_image']) && $paramMMode['b_fixed_image']==1) {
494
  $optionBackground = 'background-attachment:fixed;';
495
  }
543
  }
544
 
545
  /*********** AJOUT DU STYLE SUIVANT LES PARAMETRES *********/
546
+ $wpmFonts = '
547
+ @import url(https://fonts.googleapis.com/css?family='.str_replace(' ', '+', $paramMMode['font_title']).'|'.str_replace(' ', '+',$paramMMode['font_text']).'|'.str_replace(' ', '+',$paramMMode['font_text_bottom']).'|'.str_replace(' ', '+',$paramMMode['font_cpt']);
548
+ if( isset($paramMMode['newletter_font_text']) && $paramMMode['newletter_font_text'] != '') {
549
+ $wpmFonts .= '|'.str_replace(' ', '+',$paramMMode['newletter_font_text']);
550
+ }
551
+ $wpmFonts .= ');';
552
 
553
  $wpmStyle .= ''.$addBImage.'
554
  .wpm_social_icon {