forked from digitoimistodude/air-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
158 lines (138 loc) · 3.29 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
<?php
/**
* Gather all bits and pieces together.
* If you end up having multiple post types, taxonomies,
* hooks and functions - please split those to their
* own files under /inc and just require here.
*
* @Date: 2019-10-15 12:30:02
* @Last Modified by: Timi Wahalahti
* @Last Modified time: 2021-02-23 13:40:37
*
* @package air-light
*/
namespace Air_Light;
/**
* The current version of the theme.
*/
define( 'AIR_LIGHT_VERSION', '7.1.3' );
/**
* Theme settings
*/
$theme_settings = [
/**
* Image and content sizes
*/
'image_sizes' => [
'small' => 300,
'medium' => 700,
'large' => 1200,
],
'content_width' => 800,
/**
* Logo and featured image
*/
'default_featured_image' => null,
'logo' => '/svg/logo.svg',
/**
* Theme textdomain
*/
'textdomain' => 'air-light',
/**
* Menu locations
*/
'menu_locations' => [
'primary' => __( 'Primary Menu', 'air-light' ),
],
/**
* Taxonomies
*
* See the instructions:
* https://github.com/digitoimistodude/air-light#custom-taxonomies
*/
'taxonomies' => [
/**
'your-taxonomy' => [
'name' => 'Your_Taxonomy',
'post_types' => [ 'post', 'page' ],
],
*/
],
/**
* Post types
*
* See the instructions:
* https://github.com/digitoimistodude/air-light#custom-post-types
*/
// TODO Instructions how to add post types
'post_types' => [
// 'your-post-type' => 'Your_Post_Type',
],
/**
* Gutenberg -related settings
*/
// If you want to use classic editor somewhere, define it here
'use_classic_editor' => [ 'page' ],
// Don't restrict blocks
// 'allowed_blocks' => 'all',
// Restrict to only selected blocks
'allowed_blocks' => [
// Set default blocks allowed in every post type
'default' => [
'core/archives',
'core/audio',
'core/buttons',
'core/categories',
'core/code',
'core/column',
'core/columns',
// 'core/coverImage',
'core/embed',
'core/file',
'core/freeform',
'core/gallery',
'core/heading',
'core/html',
'core/image',
'core/latestComments',
'core/latestPosts',
'core/list',
'core/more',
'core/nextpage',
'core/paragraph',
'core/preformatted',
'core/pullquote',
'core/quote',
'core/reusableBlock',
'core/separator',
'core/shortcode',
'core/spacer',
'core/subhead',
'core/table',
'core/textColumns',
'core/verse',
'core/video',
],
'post' => [
'core/coverImage', // This block is now allowed only in posts
],
],
// Module caching
'enable_module_caching' => true,
'exclude_module_from_cache' => [
'contact-form' => true,
],
// Add your own settings and use them wherever you need, for example THEME_SETTINGS['my_custom_setting']
'my_custom_setting' => true,
];
$theme_settings = apply_filters( 'air_helper_theme_settings', $theme_settings );
define( 'THEME_SETTINGS', $theme_settings );
/**
* Required files
*/
require get_theme_file_path( '/inc/hooks.php' );
require get_theme_file_path( '/inc/includes.php' );
require get_theme_file_path( '/inc/template-tags.php' );
// Run theme setup
add_action( 'init', __NAMESPACE__ . '\theme_setup' );
add_action( 'after_setup_theme', __NAMESPACE__ . '\build_theme_support' );