PluginProbe ʕ •ᴥ•ʔ
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder / 2.5.0
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder v2.5.0
2.6.22 trunk 1.3 1.5.3 1.6.10 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.8.0 1.8.1 1.8.10 1.8.11 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.2 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.18 2.6.19 2.6.2 2.6.20 2.6.21 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9
wp-maintenance-mode / wp-maintenance-mode.php
wp-maintenance-mode Last commit date
assets 3 years ago includes 3 years ago languages 5 years ago vendor 3 years ago views 3 years ago CHANGELOG.md 3 years ago README.md 3 years ago index.php 9 years ago readme.txt 3 years ago uninstall.php 5 years ago wp-maintenance-mode.php 3 years ago
wp-maintenance-mode.php
100 lines
1 <?php
2 /**
3 * WP Maintenance Mode
4 *
5 * Plugin Name: WP Maintenance Mode & Coming Soon
6 * Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
7 * Version: 2.5.0
8 * Author: Themeisle
9 * Author URI: https://themeisle.com/
10 * Twitter: themeisle
11 * GitHub Plugin URI: https://github.com/codeinwp/wp-maintenance-mode
12 * License: GPL-2.0+
13 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
14 * Text Domain: wp-maintenance-mode
15 * Domain Path: /languages
16 * WordPress Available: yes
17 * Requires License: no
18 */
19
20 defined( 'ABSPATH' ) || exit;
21
22 /**
23 * DEFINE PATHS
24 */
25 define( 'WPMM_PATH', plugin_dir_path( __FILE__ ) );
26 define( 'WPMM_CLASSES_PATH', WPMM_PATH . 'includes/classes/' );
27 define( 'WPMM_FUNCTIONS_PATH', WPMM_PATH . 'includes/functions/' );
28 define( 'WPMM_LANGUAGES_PATH', basename( WPMM_PATH ) . '/languages/' );
29 define( 'WPMM_VIEWS_PATH', WPMM_PATH . 'views/' );
30 define( 'WPMM_CSS_PATH', WPMM_PATH . 'assets/css/' );
31 define( 'WPMM_TEMPLATES_PATH', WPMM_PATH . 'assets/templates/' );
32
33 /**
34 * DEFINE URLS
35 */
36 define( 'WPMM_URL', plugin_dir_url( __FILE__ ) );
37 define( 'WPMM_JS_URL', WPMM_URL . 'assets/js/' );
38 define( 'WPMM_CSS_URL', WPMM_URL . 'assets/css/' );
39 define( 'WPMM_IMAGES_URL', WPMM_URL . 'assets/images/' );
40 define( 'WPMM_TEMPLATES_URL', WPMM_URL . 'assets/templates/' );
41
42 /**
43 * OTHER DEFINES
44 */
45 define( 'WPMM_ASSETS_SUFFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
46
47 /**
48 * FUNCTIONS
49 */
50 require_once WPMM_FUNCTIONS_PATH . 'hooks.php';
51 require_once WPMM_FUNCTIONS_PATH . 'helpers.php';
52 if ( is_multisite() && ! function_exists( 'is_plugin_active_for_network' ) ) {
53 require_once ABSPATH . '/wp-admin/includes/plugin.php';
54 }
55
56 /**
57 * FRONTEND
58 */
59 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-shortcodes.php';
60 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode.php';
61 register_activation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'activate' ) );
62 register_deactivation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'deactivate' ) );
63
64 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode', 'get_instance' ) );
65
66 /**
67 * DASHBOARD
68 */
69 if ( is_admin() ) {
70 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-admin.php';
71 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode_Admin', 'get_instance' ) );
72 }
73
74 add_filter( 'themeisle_sdk_products', 'wpmm_load_sdk' );
75
76
77 /**
78 * Filter products array.
79 *
80 * @param array $products products array.
81 *
82 * @return array
83 */
84 function wpmm_load_sdk( $products ) {
85 $products[] = __FILE__;
86 return $products;
87 }
88
89 $autoload_path = __DIR__ . '/vendor/autoload.php';
90 if ( is_file( $autoload_path ) ) {
91 require_once $autoload_path;
92 }
93
94 add_filter(
95 'wp_maintenance_mode_load_promotions',
96 function() {
97 return array( 'otter' );
98 }
99 );
100