WP Maintenance - Version 2.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.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

Files changed (4) hide show
  1. readme.txt +6 -3
  2. uninstall.php +6 -6
  3. wp-maintenance-admin.php +12 -12
  4. wp-maintenance.php +5 -5
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Florent73
3
  Donate link:
4
  Tags: wordpress maintenance plugin
5
  Requires at least: 3.0
6
- Tested up to: 4.0
7
- Stable tag: 2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,12 +65,15 @@ Oui mais merci de me soumettre les modifications souhaitées afin de mettre à j
65
 
66
  == Upgrade Notice ==
67
 
68
- = 2.0 =
69
  Cette version est stable / This version is stable
70
 
71
 
72
  == Changelog ==
73
 
 
 
 
74
  = 2.0 =
75
  * Ajout des Google Fonts et style de police / Adding Google Fonts and font style
76
 
3
  Donate link:
4
  Tags: wordpress maintenance plugin
5
  Requires at least: 3.0
6
+ Tested up to: 4.0.1
7
+ Stable tag: 2.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.1 =
69
  Cette version est stable / This version is stable
70
 
71
 
72
  == Changelog ==
73
 
74
+ = 2.1 =
75
+ * Correction d'une notice sur un argument déprécié / Fixed a notice on a depreciated argument
76
+
77
  = 2.0 =
78
  * Ajout des Google Fonts et style de police / Adding Google Fonts and font style
79
 
uninstall.php CHANGED
@@ -4,13 +4,13 @@
4
  * Désinstallation du plugin WP Maintenance
5
  */
6
  function wpm_uninstall() {
7
- if(get_option('wp_maintenance_settings')) { delete_option('wp_maintenance_settings'); }
8
- if(get_option('wp_maintenance_version')) { delete_option('wp_maintenance_version'); }
9
- if(get_option('wp_maintenance_style')) { delete_option('wp_maintenance_style'); }
10
- delete_option('wp_maintenance_limit');
11
  delete_option('wp_maintenance_active');
12
- if(get_option('wp_maintenance_social')) { delete_option('wp_maintenance_social'); }
13
- if(get_option('wp_maintenance_social_options')) { delete_option('wp_maintenance_social_options'); }
14
 
15
  }
16
  register_deactivation_hook(__FILE__, 'wpm_uninstall');
4
  * Désinstallation du plugin WP Maintenance
5
  */
6
  function wpm_uninstall() {
7
+ //if(get_option('wp_maintenance_settings')) { delete_option('wp_maintenance_settings'); }
8
+ //if(get_option('wp_maintenance_version')) { delete_option('wp_maintenance_version'); }
9
+ //if(get_option('wp_maintenance_style')) { delete_option('wp_maintenance_style'); }
10
+ //delete_option('wp_maintenance_limit');
11
  delete_option('wp_maintenance_active');
12
+ //if(get_option('wp_maintenance_social')) { delete_option('wp_maintenance_social'); }
13
+ //if(get_option('wp_maintenance_social_options')) { delete_option('wp_maintenance_social_options'); }
14
 
15
  }
16
  register_deactivation_hook(__FILE__, 'wpm_uninstall');
wp-maintenance-admin.php CHANGED
@@ -20,18 +20,18 @@ 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($paramMMode['font_title_size']=='') { $paramMMode['font_title_size'] = 40; }
24
- if($paramMMode['font_title_style']=='') { $paramMMode['font_title_style'] = 'normal'; }
25
- if($paramMMode['font_title_weigth']=='') { $paramMMode['font_title_weigth'] = 'normal'; }
26
- if($paramMMode['font_text_size']=='') { $paramMMode['font_text_size'] = 40; }
27
- if($paramMMode['font_text_style']=='') { $paramMMode['font_text_style'] = 'normal'; }
28
- if($paramMMode['font_text_weigth']=='') { $paramMMode['font_text_weigth'] = 'normal'; }
29
- if($paramMMode['font_text_bottom']=='') { $paramMMode['font_text_bottom'] = 'normal'; }
30
- if($paramMMode['font_bottom_size']=='') { $paramMMode['font_bottom_size'] = 12; }
31
- if($paramMMode['font_bottom_weigth']=='') { $paramMMode['font_bottom_weigth'] = 'normal'; }
32
- if($paramMMode['font_bottom_style']=='') { $paramMMode['font_bottom_style'] = 'normal'; }
33
- if($paramMMode['font_cpt']=='') { $paramMMode['font_cpt'] = 'Acme'; }
34
- if($paramMMode['date_cpt_size']=='') { $paramMMode['date_cpt_size'] = 72; }
35
 
36
  // Récupère les Rôles et capabilités
37
  if(get_option('wp_maintenance_limit')) { extract(get_option('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['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'; }
26
+ if( !isset($paramMMode['font_text_size']) ) { $paramMMode['font_text_size'] = 40; }
27
+ if( !isset($paramMMode['font_text_style']) ) { $paramMMode['font_text_style'] = 'normal'; }
28
+ if( !isset($paramMMode['font_text_weigth']) ) { $paramMMode['font_text_weigth'] = 'normal'; }
29
+ if( !isset($paramMMode['font_text_bottom']) ) { $paramMMode['font_text_bottom'] = 'normal'; }
30
+ if( !isset($paramMMode['font_bottom_size']) ) { $paramMMode['font_bottom_size'] = 12; }
31
+ if( !isset($paramMMode['font_bottom_weigth']) ) { $paramMMode['font_bottom_weigth'] = 'normal'; }
32
+ if( !isset($paramMMode['font_bottom_style']) ) { $paramMMode['font_bottom_style'] = 'normal'; }
33
+ if( !isset($paramMMode['font_cpt']) ) { $paramMMode['font_cpt'] = 'Acme'; }
34
+ if( !isset($paramMMode['date_cpt_size']) ) { $paramMMode['date_cpt_size'] = 72; }
35
 
36
  // Récupère les Rôles et capabilités
37
  if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
wp-maintenance.php CHANGED
@@ -6,12 +6,13 @@ Plugin URI: http://wordpress.org/extend/plugins/wp-maintenance/
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.0
10
  */
11
 
12
 
13
  /*
14
  Change Log
 
15
  09/08/2014 - Ajout de Fonts et Styles
16
  17/07/2014 - Correction bug feuille de style
17
  20/05/2014 - Correction bug upload d'image
@@ -61,7 +62,7 @@ function wpm_make_multilang() {
61
  }
62
 
63
  /* Ajoute la version dans les options */
64
- define('WPM_VERSION', '2.0');
65
  $option['wp_maintenance_version'] = WPM_VERSION;
66
  if( !get_option('wp_maintenance_version') ) {
67
  add_option('wp_maintenance_version', $option);
@@ -84,7 +85,7 @@ function wpm_get_roles() {
84
  }
85
 
86
  function wpm_add_admin() {
87
- $hook = add_options_page("Options pour l'affichage de la page maintenance", "WP Maintenance", 10, __FILE__, "wpm_admin_panel");
88
 
89
  $wp_maintenanceAdminOptions = array(
90
  'color_bg' => "#f1f1f1",
@@ -290,11 +291,10 @@ function wpm_maintenance_mode() {
290
 
291
  if ($statusActive == 1) {
292
 
293
- $urlTpl = get_stylesheet_directory();
294
 
295
  if($paramMMode['pageperso']==1) {
296
 
297
- $urlTpl = get_stylesheet_directory();
298
  $content = file_get_contents( $urlTpl. '/maintenance.php' );
299
 
300
  } else {
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.1
10
  */
11
 
12
 
13
  /*
14
  Change Log
15
+ 03/12/2014 - Correction d'une notice sur un argument déprécié / Fixed a notice on a depreciated argument
16
  09/08/2014 - Ajout de Fonts et Styles
17
  17/07/2014 - Correction bug feuille de style
18
  20/05/2014 - Correction bug upload d'image
62
  }
63
 
64
  /* Ajoute la version dans les options */
65
+ define('WPM_VERSION', '2.1');
66
  $option['wp_maintenance_version'] = WPM_VERSION;
67
  if( !get_option('wp_maintenance_version') ) {
68
  add_option('wp_maintenance_version', $option);
85
  }
86
 
87
  function wpm_add_admin() {
88
+ $hook = add_options_page("Options pour l'affichage de la page maintenance", "WP Maintenance", 'manage_options', __FILE__, "wpm_admin_panel");
89
 
90
  $wp_maintenanceAdminOptions = array(
91
  'color_bg' => "#f1f1f1",
291
 
292
  if ($statusActive == 1) {
293
 
294
+ $urlTpl = get_stylesheet_directory_uri();
295
 
296
  if($paramMMode['pageperso']==1) {
297
 
 
298
  $content = file_get_contents( $urlTpl. '/maintenance.php' );
299
 
300
  } else {