-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.php
367 lines (306 loc) · 10.9 KB
/
options.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<?php
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
* By default it uses 'foghorn'. If the identifier changes, it'll appear as if the options have been reset.
*
*/
function optionsframework_option_name() {
$optionsframework_settings = get_option('optionsframework');
$optionsframework_settings['id'] = 'foghorn';
update_option('optionsframework', $optionsframework_settings);
}
/**
* Defines an array of options that will be used to generate the settings page and be saved in the database.
* When creating the "id" fields, make sure to use all lowercase and no spaces.
*
*/
function optionsframework_options() {
// If using image radio buttons, define a directory path
$imagepath = get_bloginfo('template_url') . '/images/';
// Options array
$options = array();
$options[] = array( "name" => __('General Settings','foghorn'),
"type" => "heading");
$options[] = array( "name" => __('Custom Logo','foghorn'),
"desc" => __('Upload a logo for your site. 150px x 150px standard','foghorn'),
"id" => "logo",
"type" => "upload");
$options[] = array( "name" => __('Override logo dimensions and text','foghorn'),
"desc" => __('Use custom logo which includes text and may be greater than 150px wide (height is still 150px max.','foghorn'),
"id" => "logo_override",
"std" => "0",
"type" => "checkbox");
$options[] = array( "name" => __('Display Site Tagline','foghorn'),
"desc" => __('Display the site tagline under the site title.','foghorn'),
"id" => "tagline",
"std" => "0",
"type" => "checkbox");
$options[] = array( "name" => __('Menu Position','foghorn'),
"desc" => __('Check to display the menu underneath the logo and floated left. Good for long menus.','foghorn'),
"id" => "menu_position",
"std" => "0",
"type" => "checkbox");
$options[] = array( "name" => __('Layout','foghorn'),
"desc" => __('Select a site layout: sidebar right, sidebar left, or no sidebar.','foghorn'),
"id" => "layout",
"std" => "layout-2cr",
"type" => "images",
"options" => array(
'layout-2cr' => $imagepath . '2cr.png',
'layout-2cl' => $imagepath . '2cl.png',
'layout-1c' => $imagepath . '1col.png',)
);
$options[] = array( "name" => __('Custom Footer Text','foghorn'),
"desc" => __('Custom text for the footer of your theme.','foghorn'),
"id" => "footer_text",
"std" => __( 'Powered by ', 'foghorn' ) . '<a href="http://www.wordpress.org">WordPress</a> ' . __( 'and ', 'foghorn' ) . '<a href="https://github.com/devinsays/foghorn">' . __( 'Foghorn', 'foghorn' ) . '</a>',
"type" => "textarea");
/////////// ADDED //////////////
$options[] = array(
'name' => __('Hub Settings', 'options_check'),
'type' => 'heading');
$options[] = array(
'name' => __('Hub Title', 'options_check'),
'desc' => __('Enter title for Hub, full name', 'options_check'),
'id' => 'hub-title',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Hub Handle', 'options_check'),
'desc' => __('Enter the handle for the hub: no spaces. ex. bankjustice', 'options_check'),
'id' => 'hub-handle',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Hub Mailing List Link', 'options_check'),
'desc' => __('Enter URL for mailing list signup', 'options_check'),
'id' => 'hub-list',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('CiviCRM ID', 'options_check'),
'desc' => __('Enter ID of CiviCRM list', 'options_check'),
'id' => 'civi-list',
'std' => '',
'type' => 'text');
$wp_editor_settings_contact = array(
'wpautop' => true, // Default
'textarea_rows' => 3,
'tinymce' => array( 'plugins' => 'wordpress' )
);
$options[] = array(
'name' => __('Contact Info', 'options_check'),
'desc' => __( 'More than just info and press contacts', 'options_check' ),
'id' => 'contact-person',
'type' => 'editor',
'settings' => $wp_editor_settings_contact );
$options[] = array(
'name' => __('Contact Email', 'options_check'),
'desc' => __('Contact Email', 'options_check'),
'id' => 'contact-email',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Press Email', 'options_check'),
'desc' => __('Press Email', 'options_check'),
'id' => 'press-email',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Donate Link', 'options_check'),
'desc' => __('full url of donate page', 'options_check'),
'id' => 'donate-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Volunteer Link', 'options_check'),
'desc' => __('full url of volunteer page', 'options_check'),
'id' => 'volunteer-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Public Phone #', 'options_check'),
'desc' => __('Phone number that is publically shared', 'options_check'),
'id' => 'contact-phone',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Short Description', 'options_check'),
'desc' => __('In 30 words or less...', 'options_check'),
'id' => 'short-desc',
'std' => '',
'type' => 'textarea');
$options[] = array(
'name' => __('Hub Image', 'options_check'),
'desc' => __('Upload an image for your hub', 'options_check'),
'id' => 'hub-image',
'type' => 'upload');
/**
* For $settings options see:
* http://codex.wordpress.org/Function_Reference/wp_editor
*
* 'media_buttons' are not supported as there is no post to attach items to
* 'textarea_name' is set by the 'id' you choose
*/
$wp_editor_settings = array(
'wpautop' => true, // Default
'textarea_rows' => 5,
'tinymce' => array( 'plugins' => 'wordpress' )
);
$options[] = array(
'name' => __('Full hub description', 'options_check'),
'desc' => __( '', 'options_check' ),
'id' => 'full-desc',
'type' => 'editor',
'settings' => $wp_editor_settings );
$options[] = array(
'name' => __('Carousel Background', 'options_check'),
'desc' => __('Color behind header images', 'options_check'),
'id' => 'color-header-bg',
'std' => '',
'type' => 'color' );
$options[] = array(
'name' => __('Input Checkbox', 'options_check'),
'desc' => __('Regular call?', 'options_check'),
'id' => 'regular-call',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Hub Tools', 'options_check'),
'type' => 'heading');
$options[] = array(
'name' => __('Hub Facebook Page', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'hub-facebook',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Hub Twitter', 'options_check'),
'desc' => __('Enter Twitter handle ONLY', 'options_check'),
'id' => 'hub-twitter',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Social Media Additions', 'options_check'),
'desc' => __( 'Whatever else you would like under Follow Us', 'options_check' ),
'id' => 'hub-social',
'type' => 'editor',
'settings' => $wp_editor_settings_contact );
$options[] = array(
'name' => __('Call Information', 'options_check'),
'desc' => __('Basics about call dates and times', 'options_check'),
'id' => 'call-info',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Hub Web Page', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'hub-website',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('O.NET Forum', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'hub-forum',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('O.NET Wiki', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'hub-wiki',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('O.NET Classifieds', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'hub-classifieds',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Header Images', 'options_check'),
'type' => 'heading');
$options[] = array(
'name' => __('Image #1', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-1',
'type' => 'upload');
$options[] = array(
'name' => __('Image #1 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-1-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #2', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-2',
'type' => 'upload');
$options[] = array(
'name' => __('Image #2 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-2-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #3', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-3',
'type' => 'upload');
$options[] = array(
'name' => __('Image #3 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-3-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #4', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-4',
'type' => 'upload');
$options[] = array(
'name' => __('Image #4 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-4-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #5', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-5',
'type' => 'upload');
$options[] = array(
'name' => __('Image #5 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-5-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #6', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-6',
'type' => 'upload');
$options[] = array(
'name' => __('Image #6 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-6-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #7', 'options_check'),
'desc' => __('Upload an image', 'options_check'),
'id' => 'header-7',
'type' => 'upload');
$options[] = array(
'name' => __('Image #7 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-7-link',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Image #8 Link', 'options_check'),
'desc' => __('Enter full URL, including http://', 'options_check'),
'id' => 'header-8-link',
'std' => '',
'type' => 'text');
return $options;
}