PluginProbe ʕ •ᴥ•ʔ
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder / 2.6.18
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder v2.6.18
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
111 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.18
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 define( 'WPMM_PRODUCT_SLUG', basename( dirname( __FILE__ ) ) );
34
35 /**
36 * DEFINE URLS
37 */
38 define( 'WPMM_URL', plugin_dir_url( __FILE__ ) );
39 define( 'WPMM_JS_URL', WPMM_URL . 'assets/js/' );
40 define( 'WPMM_CSS_URL', WPMM_URL . 'assets/css/' );
41 define( 'WPMM_IMAGES_URL', WPMM_URL . 'assets/images/' );
42 define( 'WPMM_TEMPLATES_URL', WPMM_URL . 'assets/templates/' );
43
44 /**
45 * OTHER DEFINES
46 */
47 define( 'WPMM_ASSETS_SUFFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
48
49 /**
50 * FUNCTIONS
51 */
52 require_once WPMM_FUNCTIONS_PATH . 'hooks.php';
53 require_once WPMM_FUNCTIONS_PATH . 'helpers.php';
54 if ( is_multisite() && ! function_exists( 'is_plugin_active_for_network' ) ) {
55 require_once ABSPATH . '/wp-admin/includes/plugin.php';
56 }
57
58 /**
59 * FRONTEND
60 */
61 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-shortcodes.php';
62 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode.php';
63 register_activation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'activate' ) );
64 register_deactivation_hook( __FILE__, array( 'WP_Maintenance_Mode', 'deactivate' ) );
65
66 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode', 'get_instance' ) );
67
68 /**
69 * DASHBOARD
70 */
71 if ( is_admin() ) {
72 require_once WPMM_CLASSES_PATH . 'wp-maintenance-mode-admin.php';
73 add_action( 'plugins_loaded', array( 'WP_Maintenance_Mode_Admin', 'get_instance' ) );
74 }
75
76 add_filter( 'themeisle_sdk_products', 'wpmm_load_sdk' );
77
78 add_filter(
79 'wp_maintenance_mode_about_us_metadata',
80 function() {
81 return array(
82 'logo' => esc_url( WPMM_IMAGES_URL . 'icon.svg' ),
83 'location' => 'wp-maintenance-mode',
84 );
85 }
86 );
87
88 /**
89 * Filter products array.
90 *
91 * @param array $products products array.
92 *
93 * @return array
94 */
95 function wpmm_load_sdk( $products ) {
96 $products[] = __FILE__;
97 return $products;
98 }
99
100 $autoload_path = __DIR__ . '/vendor/autoload.php';
101 if ( is_file( $autoload_path ) ) {
102 require_once $autoload_path;
103 }
104
105 add_filter(
106 'wp_maintenance_mode_load_promotions',
107 function() {
108 return array( 'otter' );
109 }
110 );
111