-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
31 lines (29 loc) · 941 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
<?php
/**
* TWIST includes and constants
*
* The $twist_includes array determines the code library included in your theme.
* Add or remove files to the array as needed.
*
* Please note that missing files will produce a fatal error.
*
* Also add any constants here.
*/
// Includes.
$twist_includes = [
'inc/cachebuster.php', // Cache busting.
'inc/extras.php', // Custom functions.
'inc/setup.php', // Theme setup.
'inc/security.php', // Security.
'inc/assets.php', // Assets inclusion.
'inc/blocks.php', // Gutenberg blocks.
'inc/fields.php', // Custom fields
];
foreach ($twist_includes as $file) {
$filepath = locate_template($file);
if (!$filepath) {
trigger_error(sprintf(wp_kses_data(__('Error locating %s for inclusion', 'twist')), $file), E_USER_ERROR);
}
include_once $filepath;
}
unset($file, $filepath);