-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
27 lines (25 loc) · 772 Bytes
/
init.php
File metadata and controls
27 lines (25 loc) · 772 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
<?php
require 'class-SplClassLoader.php';
use SplClassLoader as ClassLoader;
$classLoader = new ClassLoader('WP_JSON_LD', dirname(__FILE__), false);
// var_dump($classLoader->getIncludePath());
$classLoader->filterFinalPath('WP_JSON_LD'.DIRECTORY_SEPARATOR, '');
$classLoader->register();
function wp_json_ld($prop = false)
{
$instance = new stdClass();
try {
$instance = new WP_JSON_LD\Application(__FILE__);
$instance->boot();
// var_dump('New Boot');
} catch (Intraxia\Jaxion\Core\ApplicationAlreadyBootedException $e) {
// var_dump('Old boot.');
$instance = WP_JSON_LD\Application::instance();
}
if (!$prop) {
return $instance;
} else {
return $instance[$prop];
}
}
pressforward();