-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathspeed-demon.php
40 lines (34 loc) · 1021 Bytes
/
speed-demon.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/*
Plugin Name: Speed Demon
Plugin URI: https://www.littlebizzy.com/plugins/speed-demon
Description: Performance hacks for WordPress
Version: 2.0.0
Requires PHP: 7.0
Author: LittleBizzy
Author URI: https://www.littlebizzy.com
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
GitHub Plugin URI: littlebizzy/speed-demon
Primary Branch: master
*/
// prevent direct access
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// disable wordpress.org updates for this plugin
add_filter( 'gu_override_dot_org', function( $overrides ) {
$overrides[] = 'speed-demon/speed-demon.php';
return $overrides;
}, 999 );
// Load settings page
require_once plugin_dir_path(__FILE__) . 'admin/settings-page.php';
// Load enabled modules
$modules = get_option('speed_demon_enabled_modules', array());
foreach ($modules as $module) {
$module_file = plugin_dir_path(__FILE__) . "modules/$module/$module.php";
if (file_exists($module_file)) {
require_once $module_file;
}
}
// Ref: ChatGPT