-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.php
More file actions
28 lines (24 loc) · 704 Bytes
/
plugin.php
File metadata and controls
28 lines (24 loc) · 704 Bytes
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
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Define plugin constants
*/
define( 'MSK_DEVTOOLS_VERSION', '1.0.0' );
define( 'MSK_DEVTOOLS_URL', plugin_dir_url( __FILE__ ) );
define( 'MSK_DEVTOOLS_DIR', plugin_dir_path( __FILE__ ) );
define( 'MSK_DEVTOOLS_PLUGIN_DIRNAME', basename( rtrim( dirname( __FILE__ ), '/' ) ) );
define( 'MSK_DEVTOOLS_BASENAME', plugin_basename( __FILE__ ) );
/**
* Register required files.
*/
function msk_fire() {
$files = [ 'class', 'utils', 'debug' ];
foreach ( $files as $file ) {
if ( is_file( MSK_DEVTOOLS_DIR . "includes/{$file}.php" ) ) {
require_once MSK_DEVTOOLS_DIR . "includes/{$file}.php";
}
}
}
add_action( 'plugins_loaded', 'msk_fire' );