-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmi11er-utility.php
44 lines (39 loc) · 988 Bytes
/
mi11er-utility.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
41
42
43
44
<?php
/**
* Plugin Name: Mi11er Utility
* Plugin URI:
* Description: It does various helpful things.
* Text Domain: mi11er-utility
* Author:
* Author URI:
* Version: 0.2.0
* License:
* License URI:
*
* @package Mi11er\Utility
*/
namespace Mi11er\Utility;
// Bail if this file is not called by Wordpress.
if ( ! defined( 'ABSPATH' ) ) {
return;
}
/**
* If an autoloader isn't already setup, we need to do it.
*/
if ( ! class_exists( 'Mi11er\Utility\Mu' ) ) {
if ( is_file( __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php' ) ) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
}
require_once __DIR__ . 'include/mi11er-utility/class-autoload.php';
}
/**
* Return the plugin contoler
* Causes it to initalize if not already
*
* @return Mi11er\Utility\Mu
*/
function mu() {
return Mu::instance();
}
// This seems like a good time to kick things off.
$GLOBALS['mi11er-utility'] = mu();