-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
49 lines (41 loc) · 961 Bytes
/
functions.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
45
46
47
48
49
<?php
/**
* Theme Name: Unicorns
* Description: Unicorns theme
* Author: Team Eightshift
* Author URI: https://eightshift.com/
* Version: 5.0.0
* Text Domain: unicorns
*
* @package Unicorns
*/
declare(strict_types=1);
namespace Unicorns;
use Unicorns\Main\Main;
use UnicornsVendor\EightshiftLibs\Cli\Cli;
/**
* If this file is called directly, abort.
*/
if (! \defined('WPINC')) {
die;
}
/**
* Include the autoloader so we can dynamically include the rest of the classes.
*/
$loader = require __DIR__ . '/vendor/autoload.php';
/**
* Begins execution of the theme.
*
* Since everything within the theme is registered via hooks,
* then kicking off the theme from this point in the file does
* not affect the page life cycle.
*/
if (class_exists(Main::class)) {
(new Main($loader->getPrefixesPsr4(), __NAMESPACE__))->register();
}
/**
* Run all WPCLI commands.
*/
if (class_exists(Cli::class)) {
(new Cli())->load('boilerplate');
}