-
Notifications
You must be signed in to change notification settings - Fork 38
/
defaults.php
231 lines (181 loc) · 7.15 KB
/
defaults.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
/*
* Global default settings for this installation
*/
// Logo (logo file is located /resources/views/patterns/00-atoms/logos/alps-logo-custom.blade.php)
// Theme Color (nad-denim/nad-nile/nad-amethyst/nad-spark/nad-miracle/nad-branch/nad-vine/treefrog/ming/bluejay/iris/lily/scarlett/campfire/winter/forest/cave/denim/emperor/grapevine/velvet/earth/night)
update_option( '_theme_color', 'campfire' );
// Dark Theme (true/false)
update_option( '_dark_theme', 'false' );
// Grid Lines (true/false)
update_option( '_grid_lines', '' );
// Square Buttons (true/false)
update_option( '_square_buttons', '' );
// Site Branding Statement (Text)
update_option( '_site_branding_statement', 'An official website of the Seventh-day Adventist Church.' );
// Global Branding Statement (Text)
update_option( '_global_branding_statement', 'Seventh-day Adventists are devoted to helping people understand the Bible to find freedom, healing, and hope in Jesus.' );
// ALPS Core files version (alps-remote/alps-local)
update_option( '_project_alps_version', 'alps-remote' );
/*
* Post Options
*/
// Home Page Title (Text)
update_option( '_posts_page_title', '' );
// Hide The Sidebar (true/false)
update_option( '_index_hide_sidebar', '' );
// Archives Page Title (Text)
update_option( '_archive_page_title', '' );
// Hide The Related Stories Image (true/false)
update_option( '_is_related_stories_image_hidden', '' );
// Hide The Sidebar (true/false)
update_option( '_archive_hide_sidebar', '' );
// Category Posts Feed Label (true/false)
update_option( '_posts_label', '' );
// Posts Feed Grid (true/false)
update_option( '_posts_grid', '' );
// Posts Feed Grid (3up) (true/false)
update_option( '_posts_grid_3up', '' );
// Posts Feed Image (true/false)
update_option( '_posts_image', '' );
// Posts Round Images (true/false)
update_option( '_posts_image_round', '' );
/*
* Sabbath Column
*/
// Hide Sabbath Icon Until Scroll (true/false)
update_option( '_sabbath_scroll', 'false' );
// Hide the sabbath column (true/false)
update_option( '_sabbath_hide', 'false' );
/*
* Footer Content
*/
// Footer Description (Text)
update_option( '_footer_description_en', 'An official website of the Seventh-day Adventist Church.' );
// Footer Copyright (Text)
update_option( '_footer_copyright', 'General Conference of Seventh-day Adventists' );
// Fallback Footer Logo Icon (square/circle)
update_option( '_footer_logo_type', 'circle' );
// Primary Secondary Navigation
function auto_nav_creation_primary() {
$name = 'Primary Navigation';
$menu_exists = wp_get_nav_menu_object($name);
// If it doesn't exist, let's create it.
if (!$menu_exists) {
$menu_id = wp_create_nav_menu($name);
$menu = get_term_by('name', $name, 'nav_menu');
// Set menu location
$locations = get_theme_mod('nav_menu_locations');
$locations['primary_navigation'] = $menu->term_id;
set_theme_mod('nav_menu_locations', $locations);
}
}
add_action('load-nav-menus.php', 'auto_nav_creation_primary');
// Secondary Navigation
function auto_nav_creation_secondary() {
$name = 'Secondary Navigation';
$menu_exists = wp_get_nav_menu_object($name);
// If it doesn't exist, let's create it.
if (!$menu_exists) {
$menu_id = wp_create_nav_menu($name);
$menu = get_term_by('name', $name, 'nav_menu');
// Set menu location
$locations = get_theme_mod('nav_menu_locations');
$locations['secondary_navigation'] = $menu->term_id;
set_theme_mod('nav_menu_locations', $locations);
}
update_option( 'menu_check', true );
}
add_action('load-nav-menus.php', 'auto_nav_creation_secondary');
// Footer Primary Navigation
function auto_nav_creation_social() {
$name = 'Social Media Navigation';
$menu_exists = wp_get_nav_menu_object($name);
// If it doesn't exist, let's create it.
if (!$menu_exists) {
$menu_id = wp_create_nav_menu($name);
$menu = get_term_by('name', $name, 'nav_menu');
// Set menu location
$locations = get_theme_mod('nav_menu_locations');
$locations['footer_primary_navigation'] = $menu->term_id;
set_theme_mod('nav_menu_locations', $locations);
}
update_option( 'menu_check', true );
}
add_action('load-nav-menus.php', 'auto_nav_creation_social');
// Footer Secondary Navigation
function auto_nav_creation_footer() {
$name = 'Footer Secondary Navigation';
$menu_exists = wp_get_nav_menu_object($name);
// If it doesn't exist, let's create it.
if (!$menu_exists) {
$menu_id = wp_create_nav_menu($name);
$menu = get_term_by('name', $name, 'nav_menu');
// Set up default menu items
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Trademark and Logo Usage', 'alps'),
'menu-item-classes' => '',
'menu-item-url' => 'https://www.adventist.org/en/copyright/trademark-and-logo-usage/',
'menu-item-status' => 'publish'
));
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Legal Notice', 'alps'),
'menu-item-url' => 'https://www.adventist.org/en/copyright/legal-notice/',
'menu-item-status' => 'publish'
));
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Privacy Policy', 'alps'),
'menu-item-url' => 'http://privacy.adventist.org/en/',
'menu-item-status' => 'publish'
));
// Set menu location
$locations = get_theme_mod('nav_menu_locations');
$locations['footer_secondary_navigation'] = $menu->term_id;
set_theme_mod('nav_menu_locations', $locations);
}
update_option( 'menu_check', true );
}
add_action('load-nav-menus.php', 'auto_nav_creation_footer');
// Drawer Navigation
function auto_nav_creation_learn_more() {
$name = 'Learn More';
$menu_exists = wp_get_nav_menu_object($name);
// If it doesn't exist, let's create it.
if (!$menu_exists) {
$menu_id = wp_create_nav_menu($name);
$menu = get_term_by('name', $name, 'nav_menu');
// Set up default menu items
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Adventist.org', 'alps'),
'menu-item-classes' => '',
'menu-item-url' => 'https://www.adventist.org/en/',
'menu-item-status' => 'publish'
));
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('ADRA', 'alps'),
'menu-item-url' => 'https://adra.org/',
'menu-item-status' => 'publish'
));
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Adventist World Radio', 'alps'),
'menu-item-url' => 'https://www.awr.org/',
'menu-item-status' => 'publish'
));
wp_update_nav_menu_item($menu->term_id, 0, array(
'menu-item-title' => __('Hope Channel', 'alps'),
'menu-item-url' => 'https://www.hopetv.org/',
'menu-item-status' => 'publish'
));
// Set menu location
$locations = get_theme_mod('nav_menu_locations');
$locations['learn_more_navigation'] = $menu->term_id;
set_theme_mod('nav_menu_locations', $locations);
}
update_option( 'menu_check', true );
}
add_action('load-nav-menus.php', 'auto_nav_creation_learn_more');
/*
* Translate Content
*/
// Translate Description (Text)
update_option( '_translate_description', 'An official website of the Seventh-day Adventist Church.' );