-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
54 lines (39 loc) · 901 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
50
51
52
53
54
<?php
/**
* Boot of the theme
*
* Thanks WPEmerge, Postlight_Headless_WP
*/
if (!defined('ABSPATH')) {
exit;
}
// Loading Core modifications.
require_once 'app/core/core.php';
// Register hooks.
require_once 'app/hooks.php';
add_action(
'after_setup_theme',
function () {
//Load textdomain.
load_theme_textdomain('app', '/languages');
//Register theme support.
require_once 'app/setup/theme-support.php';
// Register menu locations.
require_once 'app/setup/menus.php';
}
);
add_action(
'init',
function () {
// Register post types.
require_once 'app/setup/post-types.php';
// Register taxonomies.
require_once 'app/setup/taxonomies.php';
}
);
// Register All custom API.
foreach (glob(get_template_directory() . "/app/api/*.php") as $filename) {
require_once $filename;
}
// (Optional) Register Carbon Fields.
// require_once 'app/carbon-fields.php';