PluginProbe ʕ •ᴥ•ʔ
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder / 2.6.12
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder v2.6.12
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 1 year ago includes 1 year ago languages 5 years ago vendor 1 year ago views 1 year ago CHANGELOG.md 1 year ago README.md 1 year ago index.php 9 years ago readme.txt 1 year ago uninstall.php 5 years ago wp-maintenance-mode.php 1 year ago
wp-maintenance-mode.php
110 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.12
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 add_filter(
78 'wp_maintenance_mode_about_us_metadata',
79 function() {
80 return array(
81 'logo' => esc_url( WPMM_IMAGES_URL . 'icon.svg' ),
82 'location' => 'wp-maintenance-mode',
83 );
84 }
85 );
86
87 /**
88 * Filter products array.
89 *
90 * @param array $products products array.
91 *
92 * @return array
93 */
94 function wpmm_load_sdk( $products ) {
95 $products[] = __FILE__;
96 return $products;
97 }
98
99 $autoload_path = __DIR__ . '/vendor/autoload.php';
100 if ( is_file( $autoload_path ) ) {
101 require_once $autoload_path;
102 }
103
104 add_filter(
105 'wp_maintenance_mode_load_promotions',
106 function() {
107 return array( 'otter' );
108 }
109 );
110