-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.php
47 lines (37 loc) · 1.27 KB
/
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
<?php
/**
* Onyx Theme autoloader and requirements
*
* @package Onyx Theme
*/
/*
|--------------------------------------------------------------------------
| Register Auto Loader
|--------------------------------------------------------------------------
*/
$autoload = __DIR__ . '/core/vendor/autoload.php';
if ( ! file_exists( $autoload ) ) {
wp_die( 'Please, run <code>composer install</code> inside your theme directory.' );
}
require_once $autoload;
/*
|--------------------------------------------------------------------------
| Require Theme Functions
|--------------------------------------------------------------------------
*/
require_once __DIR__ . '/core/includes/hooks-functions.php';
/*
|--------------------------------------------------------------------------
| Initiate Timber
|--------------------------------------------------------------------------
*/
Timber\Timber::init();
Timber\Timber::$dirname = 'views';
/*
|--------------------------------------------------------------------------
| Initiate Theme Setup
|--------------------------------------------------------------------------
*/
new \Onyx\Setup(); // setup theme configuration `after_setup_theme`
new \Onyx\Boot(); // boot controllers routes functionality
// \Onyx\Helpers::clear_cache_timber();