-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
175 lines (140 loc) · 3.6 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
// child theme can now use get_theme_file_path()
// use parent styles?
/*
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_theme_file_path().'/style.min.css' );
}*/
$theme = wp_get_theme();
define( 'THEME_VERSION', $theme->Version ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
/**
* Composer Libraries
*/
require get_theme_file_path() . '/vendor/autoload.php';
/**
* Site data the theme can use
*/
require get_theme_file_path() . '/inc/get-site-data.php';
/**
* Custom settings
*/
require get_theme_file_path() . '/inc/custom-settings.php';
/**
* User account functionality
*/
require get_theme_file_path() . '/inc/user-accounts.php';
/**
* Custom content types
*/
require get_theme_file_path() . '/inc/custom-types.php';
/**
* Custom fields for this theme.
*/
require get_theme_file_path() . '/inc/custom-fields.php';
/**
* Custom forms for this theme.
*/
require get_theme_file_path() . '/inc/custom-forms.php';
/**
* Custom shortcodes for this theme.
*/
require get_theme_file_path() . '/inc/custom-shortcodes.php';
/**
* Implement the Custom Header feature.
*/
// require get_theme_file_path() . '/inc/custom-header.php';
/**
* Custom template functions for this theme.
*/
require get_theme_file_path() . '/inc/template-functions.php';
/**
* Menu functions and filters
*/
require get_theme_file_path() . '/inc/menu-functions.php';
/**
* Custom template tags for this theme.
*/
require get_theme_file_path() . '/inc/template-tags.php';
/**
* Meta tags for the theme
*/
require get_theme_file_path() . '/inc/meta.php';
/**
* File uploads
*/
require get_theme_file_path() . '/inc/uploads.php';
/**
* Custom functions for emails the site sends.
*/
require get_theme_file_path() . '/inc/site-emails.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_theme_file_path() . '/inc/extras.php';
/**
* Custom sidebars
*/
require get_theme_file_path() . '/inc/sidebars.php';
/**
* Custom Queries
*/
require get_theme_file_path() . '/inc/custom-queries.php';
/**
* Comment settings and such
*/
require get_theme_file_path() . '/inc/comments.php';
/**
* Comment list
*/
require get_theme_file_path() . '/inc/comment-list.php';
/**
* Widgets
*/
require get_theme_file_path() . '/inc/widgets/widget-filter.php';
require get_theme_file_path() . '/inc/widgets/glean.php';
require get_theme_file_path() . '/inc/widgets/picked-for-you.php';
/**
* Analytics setup
*/
require get_theme_file_path() . '/inc/analytics.php';
/**
* Custom ad providers for the ad-code-manager plugin
*/
require get_theme_file_path() . '/inc/custom-ad-providers.php';
/**
* JavaScript and CSS
*/
require get_theme_file_path() . '/inc/custom-scripts-and-styles.php';
/**
* Settings for PWA (progressive web app) plugin
*/
require get_theme_file_path() . '/inc/pwa.php';
/**
* Settings for Apple News
*/
require get_theme_file_path() . '/inc/apple-news.php';
/**
* Settings for robots.txt
*/
require get_theme_file_path() . '/inc/robots.php';
/**
* The Events Calendar related methods
*/
require get_theme_file_path() . '/inc/events.php';
/**
* Elasticsearch related methods
*/
require get_theme_file_path() . '/inc/elasticsearch.php';
/**
* Jetpack related methods
*/
require get_theme_file_path() . '/inc/jetpack.php';
/**
* Settings for popup plugin, site messages plugin, etc.
*/
require get_theme_file_path() . '/inc/popups-site-messages.php';
/**
* Settings Who is running page data
*/
require get_theme_file_path() . '/inc/who-is-running.php';