-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathfunctions.php
More file actions
67 lines (57 loc) · 1.54 KB
/
Copy pathfunctions.php
File metadata and controls
67 lines (57 loc) · 1.54 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* Theme Name: Eightshift Boilerplate Setup Theme
* Description: This is a initial setup for the Eightshift WordPress Boilerplate Theme.
* Author: Eightshift team
* Author URI: https://eightshift.com/
* Version: 13.0.0
* License: MIT
* License URI: http://www.gnu.org/licenses/gpl.html
* Text Domain: eightshift-boilerplate
*
* @package EightshiftBoilerplate
*/
declare(strict_types=1);
namespace EightshiftBoilerplate;
use EightshiftBoilerplate\Cache\ManifestCache;
use EightshiftBoilerplate\Main\Main;
use EightshiftBoilerplateVendor\EightshiftLibs\Cli\Cli;
/**
* If this file is called directly, abort.
*/
if (! \defined('WPINC')) {
die;
}
/**
* Bailout, if the theme is not loaded via Composer.
*/
if (!\file_exists(__DIR__ . '/vendor/autoload.php')) {
return;
}
/**
* Require the Composer autoloader.
*/
$loader = require __DIR__ . '/vendor/autoload.php';
/**
* Require the Composer autoloader for the prefixed libraries.
*/
if (\file_exists(__DIR__ . '/vendor-prefixed/autoload.php')) {
require __DIR__ . '/vendor-prefixed/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) && \class_exists(ManifestCache::class)) {
new ManifestCache()->setAllCache();
new Main($loader->getPrefixesPsr4(), __NAMESPACE__)->register();
}
/**
* Run all WP-CLI commands.
*/
if (\class_exists(Cli::class)) {
new Cli()->load('boilerplate');
}