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