PluginProbe
Performance Lab / 4.2.0
Performance Lab v4.2.0
trunk 1.0.0 1.0.0-beta.1 1.0.0-beta.2 1.0.0-beta.3 1.0.0-rc.1 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.7.0 2.8.0 All 44 releases
performance-lab / load.php

load.php in Performance Lab 4.2.0, at load.php

57 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Performance Lab
4 * Plugin URI: https://github.com/WordPress/performance
5 * Description: Performance plugin from the WordPress Performance Team, which is a collection of standalone performance features.
6 * Requires at least: 6.9
7 * Requires PHP: 7.4
8 * Version: 4.2.0
9 * Author: WordPress Performance Team
10 * Author URI: https://make.wordpress.org/performance/
11 * License: GPLv2 or later
12 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13 * Text Domain: performance-lab
14 *
15 * @package performance-lab
16 */
17
18 declare( strict_types = 1 );
19
20 // @codeCoverageIgnoreStart
21 if ( ! defined( 'ABSPATH' ) ) {
22 exit; // Exit if accessed directly.
23 }
24 // @codeCoverageIgnoreEnd
25
26 define( 'PERFLAB_VERSION', '4.2.0' );
27 define( 'PERFLAB_MAIN_FILE', __FILE__ );
28 define( 'PERFLAB_PLUGIN_DIR_PATH', plugin_dir_path( PERFLAB_MAIN_FILE ) );
29 define( 'PERFLAB_SCREEN', 'performance-lab' );
30
31 // If the constant isn't defined yet, it means the Performance Lab object cache file is not loaded.
32 if ( ! defined( 'PERFLAB_OBJECT_CACHE_DROPIN_VERSION' ) ) {
33 define( 'PERFLAB_OBJECT_CACHE_DROPIN_VERSION', false );
34 }
35 define( 'PERFLAB_OBJECT_CACHE_DROPIN_LATEST_VERSION', 3 );
36
37 require_once __DIR__ . '/hooks.php';
38
39 // Load server-timing API.
40 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/server-timing/class-perflab-server-timing-metric.php';
41 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/server-timing/class-perflab-server-timing.php';
42 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/server-timing/load.php';
43 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/server-timing/defaults.php';
44
45 // Load site health checks.
46 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/site-health/load.php';
47
48 // Only load admin integration when in admin.
49 if ( is_admin() ) {
50 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/admin/load.php';
51 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/admin/server-timing.php';
52 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/admin/plugins.php';
53 }
54
55 // Load REST API.
56 require_once PERFLAB_PLUGIN_DIR_PATH . 'includes/admin/rest-api.php';
57