PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
mainwp / modules / system-monitor / bootstrap.php

bootstrap.php in MainWP Dashboard: Self-hosted WordPress Management for Agencies 6.2.2, at modules/system-monitor/bootstrap.php

59 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * System Monitor Bootstrap.
4 *
5 * Entry point for the System Monitor module.
6 *
7 * Responsibilities:
8 * - Load autoloader / loader
9 * - Initialize System Monitor core
10 */
11
12 namespace MainWP\Dashboard\SystemMonitor;
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18
19 require_once __DIR__ . '/class-mainwp-system-monitor-loader.php';
20
21 // Register the autoloader immediately so activation hooks and other early
22 // entry points can load System Monitor classes.
23 MainWP_System_Monitor_Loader::init();
24
25
26 /**
27 * Bootstrap System Monitor module.
28 *
29 * @return void
30 */
31 function bootstrap() {
32
33 // Initialize the system monitor core.
34 MainWP_System_Monitor::init();
35
36 add_filter(
37 'cron_schedules',
38 function ( $schedules ) {
39 if ( ! isset( $schedules['minute'] ) ) {
40 $schedules['minute'] = array(
41 'interval' => MINUTE_IN_SECONDS,
42 'display' => __( 'Every Minute', 'mainwp' ),
43 );
44 }
45 return $schedules;
46 }
47 );
48 }
49
50 /**
51 * Hook bootstrap into WordPress.
52 *
53 * Using plugins_loaded ensures:
54 * - WordPress is fully loaded
55 * - other plugins are available
56 * - safe place for module initialization
57 */
58 add_action( 'plugins_loaded', __NAMESPACE__ . '\\bootstrap' );
59