-
Notifications
You must be signed in to change notification settings - Fork 1
/
orgchart.php
42 lines (36 loc) · 1.25 KB
/
orgchart.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
<?php
/**
* The plugin bootstrap file
*
* @wordpress-plugin
* Plugin Name: UT Dallas Research Org Chart
* Plugin URI: https://github.com/utdallasresearch/orgchart-wordpress-plugin
* Description: A WordPress plugin for managing people and generating directories and org charts.
* Version: 3.3.6
* Author: UT Dallas Research Information Systems
* Author URI: https://research.utdallas.edu/oris
* License: MIT
* License URI: http://opensource.org/licenses/MIT
* Text Domain: orgchart
* Domain Path: /languages
*/
define('OrgChart\VERSION', '3.3.6');
// If this file is called directly, abort.
if (!defined('WPINC')) {
die;
}
// Autoload classes
spl_autoload_register(function ($class_name) {
$prefix = 'OrgChart\\';
$prefix_length = strlen($prefix);
if (strncmp($prefix, $class_name, $prefix_length) !== 0) { // Only autoload OrgChart classes
return;
}
$relative_class = substr($class_name, $prefix_length);
$filename = plugin_dir_path(__FILE__) . str_replace('\\', '/', $relative_class) . '.php';
if (file_exists($filename)) {
include_once $filename;
}
});
// Load the plugin
(new OrgChart\OrgChartPlugin(OrgChart\VERSION))->run();