-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmr-rocket.php
More file actions
62 lines (55 loc) · 1.09 KB
/
mr-rocket.php
File metadata and controls
62 lines (55 loc) · 1.09 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/*
Plugin Name: Mr Rocket
Text Domain: mr-rocket
Description: MR. ROCKET - SPEED UP WEBSITE PERFORMANCE
Author: Mr.Rocket
Author URI: https://www.mr-rocket.io
License: GPLv2 or later
Version: 1.0.0
*/
/* Check & Quit */
defined('ABSPATH') OR exit;
/* constants */
define('MR_ROCKET_FILE', __FILE__);
define('MR_ROCKET_DIR', dirname(__FILE__));
define('MR_ROCKET_BASE', plugin_basename(__FILE__));
define('MR_ROCKET_MIN_WP', '3.8');
/* loader */
add_action(
'plugins_loaded',
[
'Mr_Rocket',
'instance'
]
);
/* uninstall */
register_uninstall_hook(
__FILE__,
[
'Mr_Rocket',
'handle_uninstall_hook'
]
);
/* activation */
register_activation_hook(
__FILE__,
[
'Mr_Rocket',
'handle_activation_hook'
]
);
/* autoload init */
spl_autoload_register('MR_ROCKET_autoload');
/* autoload function */
function MR_ROCKET_autoload($class) {
if (in_array($class, ['Mr_Rocket', 'Mr_Rocket_Rewriter', 'Mr_Rocket_Settings'])) {
require_once(
sprintf(
'%s/inc/%s.class.php',
MR_ROCKET_DIR,
strtolower($class)
)
);
}
}