PluginProbe ʕ •ᴥ•ʔ
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder / 2.6.2
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder v2.6.2
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
101 lines
1 <?php
2 /**
3 * LightStart
4 *
5 * Plugin Name: LightStart - Maintenance Mode, Coming Soon and Landing Page Builder
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 or landing page.
7 * Version: 2.6.2
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_FILE', __FILE__ );
27 define( 'WPMM_CLASSES_PATH', WPMM_PATH . 'includes/classes/' );
28 define( 'WPMM_FUNCTIONS_PATH', WPMM_PATH . 'includes/functions/' );
29 define( 'WPMM_LANGUAGES_PATH', basename( WPMM_PATH ) . '/languages/' );
30 define( 'WPMM_VIEWS_PATH', WPMM_PATH . 'views/' );
31 define( 'WPMM_CSS_PATH', WPMM_PATH . 'assets/css/' );
32 define( 'WPMM_TEMPLATES_PATH', WPMM_PATH . 'assets/templates/' );
33
34 /**
35 * DEFINE URLS
36 */
37 define( 'WPMM_URL', plugin_dir_url( __FILE__ ) );
38 define( 'WPMM_JS_URL', WPMM_URL . 'assets/js/' );
39 define( 'WPMM_CSS_URL', WPMM_URL . 'assets/css/' );
40 define( 'WPMM_IMAGES_URL', WPMM_URL . 'assets/images/' );
41 define( 'WPMM_TEMPLATES_URL', WPMM_URL . 'assets/templates/' );
42
43 /**
44 * OTHER DEFINES
45 */
46 define( 'WPMM_ASSETS_SUFFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
47
48 /**
49 * FUNCTIONS
50 */
51 require_once WPMM_FUNCTIONS_PATH . 'hooks.php';
52 require_once WPMM_FUNCTIONS_PATH . 'helpers.php';
53 if ( is_multisite() && ! function_exists( 'is_plugin_active_for_network' ) ) {
54 require_once ABSPATH . '/wp-admin/includes/plugin.php';
55 }
56
57 /**
58 * FRONTEND
59 */
60 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-shortcodes.php';
61 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode.php';
62 register_activation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'activate' ) );
63 register_deactivation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'deactivate' ) );
64
65 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode', 'get_instance' ) );
66
67 /**
68 * DASHBOARD
69 */
70 if ( is_admin() ) {
71 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-admin.php';
72 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode_Admin', 'get_instance' ) );
73 }
74
75 add_filter( 'themeisle_sdk_products', 'wpmm_load_sdk' );
76
77
78 /**
79 * Filter products array.
80 *
81 * @param array $products products array.
82 *
83 * @return array
84 */
85 function wpmm_load_sdk( $products ) {
86 $products[] = __FILE__;
87 return $products;
88 }
89
90 $autoload_path = __DIR__ . '/vendor/autoload.php';
91 if ( is_file( $autoload_path ) ) {
92 require_once $autoload_path;
93 }
94
95 add_filter(
96 'wp_maintenance_mode_load_promotions',
97 function() {
98 return array( 'otter' );
99 }
100 );
101