-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
98 lines (84 loc) · 2.08 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
use Esq\Backend;
// Constants.
define( 'ESQUELETO_THEME_VERSION', '1.0.0' );
define( 'ESQUELETO_MINIMUM_WP_VERSION', '5.2.1' );
require_once __DIR__ . '/utils/loader/Load.php';
require_once __DIR__ . '/utils/assets/Assets.php';
// require_once __DIR__ . '/utils/wp-acf/Acf.php';
require_once __DIR__ . '/utils/wp-taxonomy/Taxonomy.php';
require_once __DIR__ . '/utils/wp-widgets/Register.php';
require_once __DIR__ . '/utils/custom-post-types/Cpt.php';
require_once __DIR__ . '/utils/wp-endpoints/AbstractEndpoint.php';
require_once __DIR__ . '/backend/Backend.php';
require_once __DIR__ . '/ThemeSetup.php';
ThemeSetup::init();
Backend::init();
// Run the theme setup.
add_filter(
'loader_directories',
function ( $directories ) {
$directories[] = get_template_directory() . '/frontend/components';
return $directories;
}
);
add_filter(
'loader_alias',
function ( $alias ) {
$alias['atom'] = 'atoms';
$alias['molecule'] = 'molecules';
$alias['organism'] = 'organisms';
$alias['template'] = 'templates';
return $alias;
}
);
/**
* Escapes same as wp_kses_post() but also inline SVG and image srcset.
*/
$allow_all_post_tags = array_merge(
wp_kses_allowed_html( 'post' ),
[
'svg' => [
'class' => true,
'aria-hidden' => true,
'aria-labelledby' => true,
'role' => true,
'xmlns' => true,
'width' => true,
'height' => true,
'viewbox' => true,
],
'g' => [
'fill' => true,
],
'title' => [
'title' => true,
],
'path' => [
'd' => true,
'fill' => true,
'stroke' => true,
'stroke-width' => true,
],
'polyline' => [
'd' => true,
'fill' => true,
'points' => true,
'stroke' => true,
'stroke-width' => true,
],
'img' => [
'class' => true,
'src' => true,
'alt' => true,
'srcset' => true,
'sizes' => true,
],
]
);
/**
* For escaping ACF text areas.
*/
$allow_break_tag = [
'br' => '',
];