-
Notifications
You must be signed in to change notification settings - Fork 2
/
wp-maintenance.php
61 lines (50 loc) · 2.67 KB
/
wp-maintenance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
* Plugin Name: WP Maintenance
* Plugin URI: https://fr.wordpress.org/plugins/wp-maintenance/
* 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...
* Author: Florent Maillefaud
* Author URI: https://madeby.restezconnectes.fr
* Version: 6.1.9.3
* Text Domain: wp-maintenance
* Domain Path: /languages/
*/
/* Copyright 2007-2024 Florent Maillefaud (email: contact at restezconnectes.fr)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
defined( 'ABSPATH' )
or die( 'No direct load ! ' );
define( 'WPM_DIR', plugin_dir_path( __FILE__ ) );
define( 'WPM_URL', plugins_url('/', __FILE__) );
define( 'WPM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
define( 'WPM_ADMIN_URL', admin_url().'admin.php?page=wp-maintenance'); //we assume the admin url is absolute with at least one querystring
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '6.1.9.3' ); }
require WPM_DIR . 'classes/wp-maintenance.php';
require WPM_DIR . 'classes/countdown.php';
require WPM_DIR . 'includes/functions.php';
require WPM_DIR . 'includes/shortcodes.php';
add_action( 'plugins_loaded', '_wpm_load' );
function _wpm_load() {
$wp_maintenance = new WP_maintenance();
$wp_maintenance->__construct();
}
// Enable localization
add_action( 'init', '_wpm_load_translation' );
function _wpm_load_translation() {
load_plugin_textdomain( 'wp-maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
register_activation_hook( __FILE__, array( 'WP_maintenance', 'wpm_dashboard_install' ) );
register_deactivation_hook( __FILE__, array( 'WP_maintenance', 'wpm_dashboard_remove' ) );
register_uninstall_hook( __FILE__, array( 'WP_maintenance', 'wpm_dashboard_remove' ) );