-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
37 lines (35 loc) · 820 Bytes
/
Copy pathfunctions.php
File metadata and controls
37 lines (35 loc) · 820 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
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Include autoloader.
*/
$autoloader = __DIR__ . '/vendor/autoload.php';
if (!is_readable($autoloader)) {
error_log(
sprintf(
// translators: 1: Theme name. 2: Composer command. 3: theme directory
__('%1$s installation is incomplete. Run %2$s within the %3$s directory.', 'my-theme'),
wp_get_theme('my-theme')->get('Name'),
'<code>composer install</code>',
'<code>' . str_replace(ABSPATH, '', __DIR__) . '</code>'
)
);
return;
}
require $autoloader;
/**
* Initialize classes
*/
array_map(function ($class) {
call_user_func(["\My\Theme\\$class", 'init']);
}, [
'Setup',
'Assets',
'Widgets',
'NavMenus',
'Blocks',
'Hooks',
'Customizer',
'Jetpack',
'Breadcrumbs',
'ACF',
]);