-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththeme-options.php
More file actions
executable file
·492 lines (451 loc) · 26.8 KB
/
theme-options.php
File metadata and controls
executable file
·492 lines (451 loc) · 26.8 KB
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
<?php
/* ------------------ */
/* theme options page */
/* ------------------ */
add_action( 'admin_init', 'theme_options_init' );
add_action( 'admin_menu', 'theme_options_add_page' );
add_action('admin_init', 'scapegoat_add_init');
function scapegoat_add_init() {
$file_dir = get_template_directory_uri();
wp_enqueue_style("scapegoatCss", $file_dir."/theme-options.css", false, "1.0", "all");
}
// Einstellungen registrieren (http://codex.wordpress.org/Function_Reference/register_setting)
function theme_options_init(){
register_setting( 'scapegoat_options', 'scapegoat_theme_options', 'scapegoat_validate_options' );
register_setting( 'scapegoat_options', 'scapegoat_category_options' );
}
// Seite in der Dashboard-Navigation erstellen
function theme_options_add_page() {
// Seitentitel, Titel in der Navi, Berechtigung zum Editieren (http://codex.wordpress.org/Roles_and_Capabilities) , Slug, Funktion
add_theme_page('Theme-Options', 'Theme-Options', 'edit_theme_options', 'theme-options', 'scapegoat_theme_options_page' );
add_theme_page('Category-Options', 'Category-Option', 'edit_theme_options', 'category-options', 'scapegoat_category_options_page' );
}
// Optionen-Seite erstellen
function scapegoat_category_options_page()
{
global $select_options, $radio_options;
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$_REQUEST['settings-updated'] = false;
}else{
$options = get_option( 'scapegoat_category_options' );
$options[$_POST["cat"]] = $_POST["scapegoat_category_options"][$_POST["cat"]];
update_option('scapegoat_category_options',$options);
// var_dump($_POST);
// var_dump($options);
}
?>
<?php settings_fields( 'scapegoat_category options' ); ?>
<?php $options = get_option( 'scapegoat_category_options' );
?>
<div class="wrap" id="arrr">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
var data = JSON.parse('<?php if($options == false){ ?>{}<?php } echo json_encode($options); ?>');
//var data = JSON.parse('{}');
$("#cat").change(function () {
var cat_id = $("#cat option:selected").val();
$("input").each(function(){
if($(this).attr("id") != undefined)
{
var new_name = $(this).attr("id").replace("$categorie", cat_id);
console.log(new_name);
$(this).attr("name", new_name);
if(cat_id in data && $(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "") in data[cat_id])
{
if($(this).attr("type") == "text")
{
console.log("text");
console.log(data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")]);
$(this).attr("value", data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")]);
}
else if($(this).attr("type") == "checkbox")
{
console.log("checkbox");
console.log(data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")]);
if(data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")] == "1")
{
$(this).attr('checked', true);
} else {
$(this).attr('checked', false);
}
} else {
console.log("radio");
console.log(data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")]);
if(data[cat_id][$(this).attr("id").replace("scapegoat_category_options[$categorie][", "").replace("]", "")] == $(this).attr("value"))
{
$(this).attr('checked', true);
} else {
$(this).attr('checked', false);
}
}
}
else
{
$(this).attr("value", "");
}
}
});
//console.log(value);
});
});
</script>
<!-- Titel -->
<?php screen_icon(); ?><h2><?php _e('Scapegoat Category-Options','scapegoat'); ?></h2>
<!-- Message -->
<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>
<div class="updated fade">
<p><strong><?php _e('Settings saved!','scapegoat'); ?></strong></p>
</div>
<?php endif; ?>
<!-- Settings -->
<!-- SELECT CATEGORIE -->
<form method="post" action="themes.php?page=category-options">
<h3><?php _e('Category','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Category','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][id]">
<?php wp_dropdown_categories(); ?>
</label>
</td>
</tr>
</table>
<h3><?php _e('Graphics','scapegoat'); ?></h3>
<p><?php printf(__('Choose an Image from your <a target="_blank" href="%s/wp-admin/upload.php">Library</a> or <a target="_blank" href="%s/wp-admin/media-new.php">upload</a> a new one.','scapegoat'), get_home_url(), get_home_url()); ?></p>
<table class="form-table">
<tr valign="top">
<th scope="row">Logo (Url)</th>
<td>
<input id="scapegoat_category_options[$categorie][logo]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][logo]" value="<?php esc_attr_e( $options['logo'] ); ?>" />
<?php if($options['logo'] == TRUE) : ?>
<img style="max-width: 240px; vertical-align: top;margin: 0 0 0 20px;" src="<?php esc_attr_e( $options['logo'] ); ?>" alt="" />
<?php endif; ?>
</td>
</tr>
<tr valign="top">
<th scope="row">Touch Icon (URL)</th>
<td>
<input id="scapegoat_category_options[$categorie][icon]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][icon]" value="<?php esc_attr_e( $options['icon'] ); ?>" />
<?php if($options['icon'] == TRUE) : ?>
<img style="max-width: 44px; vertical-align: top;margin: 0 0 0 20px;" src="<?php esc_attr_e( $options['icon'] ); ?>" alt="" />
<?php endif; ?>
</td>
</tr>
</table>
<h3><?php _e('Articles','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Excerpt','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][custom-excerpt]">
<input id="scapegoat_category_options[$categorie][custom-excerpt]" type="checkbox" name="scapegoat_category_options[$categorie][custom-excerpt]" value="1" <?php checked( '1', $options['custom-excerpt'] ); ?> /> <?php _e('automatic excerpts','scapegoat'); ?> <span class="description"><?php _e("if this is checked, you don't need more-tags",'scapegoat'); ?></span>
</label>
</td>
</tr>
</table>
<h3><?php _e('Navigation','scapegoat'); ?></h3>
<table class="form-table">
<!--<tr valign="top">
<th scope="row"><?php _e('Breadcrumb-Navigation','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][breadcrumb-show]">
<input id="scapegoat_category_options[$categorie][breadcrumb-show]" type="checkbox" name="scapegoat_category_options[$categorie][breadcrumb-show]" value="1" <?php checked( '1', $options['breadcrumb-show'] ); ?> /> <?php _e('show','scapegoat'); ?>
</label>
</td>
</tr>-->
<tr valign="top">
<th scope="row"><?php _e('Submenu','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][submenu-show]">
<input id="scapegoat_category_options[$categorie][submenu-show]" type="checkbox" name="scapegoat_category_options[$categorie][submenu-show]" value="1" <?php checked( '1', $options['submenu-show'] ); ?> /> <?php _e('show','scapegoat'); ?> <span class="description"><?php _e('at the top of the sidebar','scapegoat'); ?></span></td>
</label>
</td>
</tr>
</table>
<h3><?php _e('Frontpage','scapegoat'); ?></h3>
<table class="form-table">
<!--<tr valign="top">
<th scope="row"><?php _e('Frontpage Layout','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][frnt-page]">
<input id="scapegoat_category_options[$categorie][front-page]" type="checkbox" name="scapegoat_category_options[$categorie][front-page]" value="1" <?php checked( '1', $options['front-page'] ); ?> /> <?php _e('show','scapegoat'); ?> <span class="description"><?php _e('use custom frontpage layout','scapegoat'); ?></span></td>
</label>
</td>
</tr>-->
<tr valign="top">
<th scope="row"><?php _e('Header','scapegoat'); ?></th>
<td>
<label for="scapegoat_category_options[$categorie][header-option]">
<input id="scapegoat_category_options[$categorie][header-option]" type="radio" name="scapegoat_category_options[$categorie][header-option]" value="show-slider" <?php checked( 'show-slider' == $options['header-option'] ); ?> /> <?php _e('Slider','scapegoat'); ?>
</label>
<br />
<label for="show-header">
<input id="scapegoat_category_options[$categorie][header-option]" type="radio" name="scapegoat_category_options[$categorie][header-option]" value="show-header" <?php checked( 'show-header' == $options['header-option'] ); ?> /> <?php _e('Header','scapegoat'); ?>
</label>
<br />
<label for="show-none">
<input id="scapegoat_category_options[$categorie][header-option]" type="radio" name="scapegoat_category_options[$categorie][header-option]" value="show-none" <?php checked( 'show-none' == $options['header-option'] ); ?> /> <?php _e('Nothing','scapegoat'); ?>
</label>
</td>
</tr>
</table>
<h3><?php _e('Slider-settings','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Category (ID)','scapegoat'); ?></th>
<td><input id="scapegoat_category_options[$categorie][slider-cat]" class="small-text" type="text" name="scapegoat_category_options[$categorie][slider-cat]" value="<?php esc_attr_e( $options['slider-cat'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Amount of slides','scapegoat'); ?></th>
<td><input id="scapegoat_category_options[$categorie][slider-num]" class="small-text" type="text" name="scapegoat_category_options[$categorie][slider-num]" value="<?php esc_attr_e( $options['slider-num'] ); ?>" /> <span class="description"><?php _e('Slides','scapegoat'); ?></span></td>
</tr>
</table>
<h3><?php _e('Featured Links','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row">Link 1</th>
<td>
<input id="scapegoat_category_options[$categorie][featured-link-1]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-1]" value="<?php esc_attr_e( $options['featured-link-1'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_category_options[$categorie][featured-link-title-1]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-title-1]" value="<?php esc_attr_e( $options['featured-link-title-1'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 2</th>
<td>
<input id="scapegoat_category_options[$categorie][featured-link-2]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-2]" value="<?php esc_attr_e( $options['featured-link-2'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_category_options[$categorie][featured-link-title-2]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-title-2]" value="<?php esc_attr_e( $options['featured-link-title-2'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 3</th>
<td>
<input id="scapegoat_category_options[$categorie][featured-link-3]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-3]" value="<?php esc_attr_e( $options['featured-link-3'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_category_options[$categorie][featured-link-title-3]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-title-3]" value="<?php esc_attr_e( $options['featured-link-title-3'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 3</th>
<td>
<input id="scapegoat_category_options[$categorie][featured-link-4]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-4]" value="<?php esc_attr_e( $options['featured-link-4'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_category_options[$categorie][featured-link-title-4]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][featured-link-title-4]" value="<?php esc_attr_e( $options['featured-link-title-4'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
</table>
<h3><?php _e('Social Networks','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><span class="social-icon rss"></span> Feed</th>
<td><input id="scapegoat_category_options[$categorie][rss]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][rss]" value="<?php esc_attr_e( $options['rss'] ); ?>" /> <span class="description"> <?php _e('if this is empty, the default Wordpress-feed will set','scapegoat'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon twitter"></span> Twitter</th>
<td><input id="scapegoat_category_options[$categorie][twitter]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][twitter]" value="<?php esc_attr_e( $options['twitter'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon facebook"></span> Facebook</th>
<td><input id="scapegoat_category_options[$categorie][facebook]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][facebook]" value="<?php esc_attr_e( $options['facebook'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon google"></span> Google +</th>
<td><input id="scapegoat_category_options[$categorie][google]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][google]" value="<?php esc_attr_e( $options['google'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon youtube"></span> Youtube</th>
<td><input id="scapegoat_category_options[$categorie][youtube]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][youtube]" value="<?php esc_attr_e( $options['youtube'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon mail"></span> Newsletter</th>
<td><input id="scapegoat_category_options[$categorie][mail]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][mail]" value="<?php esc_attr_e( $options['mail'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon podcast"></span> Podcast</th>
<td><input id="scapegoat_category_options[$categorie][podcast]" class="regular-text" type="text" name="scapegoat_category_options[$categorie][podcast]" value="<?php esc_attr_e( $options['podcast'] ); ?>" /></td>
</tr>
</table>
<!-- Submit -->
<p class="submit"><input type="submit" class="button-primary" value="<?php _e('Save','scapegoat'); ?>" /></p>
</form>
</div>
<?php
}
function scapegoat_theme_options_page() {
global $select_options, $radio_options;
if ( ! isset( $_REQUEST['settings-updated'] ) )
$_REQUEST['settings-updated'] = false; ?>
<div class="wrap" id="arrr">
<!-- Titel -->
<?php screen_icon(); ?><h2><?php _e('Scapegoat Theme-Options','scapegoat'); ?></h2>
<!-- Message -->
<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>
<div class="updated fade">
<p><strong><?php _e('Settings saved!','scapegoat'); ?></strong></p>
</div>
<?php endif; ?>
<!-- Settings -->
<form method="post" action="options.php">
<?php settings_fields( 'scapegoat_options' ); ?>
<?php $options = get_option( 'scapegoat_theme_options' ); ?>
<h3><?php _e('Graphics','scapegoat'); ?></h3>
<p><?php printf(__('Choose an Image from your <a target="_blank" href="%s/wp-admin/upload.php">Library</a> or <a target="_blank" href="%s/wp-admin/media-new.php">upload</a> a new one.','scapegoat'), get_home_url(), get_home_url()); ?></p>
<table class="form-table">
<tr valign="top">
<th scope="row">Logo (Url)</th>
<td>
<input id="scapegoat_theme_options[logo]" class="regular-text" type="text" name="scapegoat_theme_options[logo]" value="<?php esc_attr_e( $options['logo'] ); ?>" />
<?php if($options['logo'] == TRUE) : ?>
<img style="max-width: 240px; vertical-align: top;margin: 0 0 0 20px;" src="<?php esc_attr_e( $options['logo'] ); ?>" alt="" />
<?php endif; ?>
</td>
</tr>
<tr valign="top">
<th scope="row">Touch Icon (URL)</th>
<td>
<input id="scapegoat_theme_options[icon]" class="regular-text" type="text" name="scapegoat_theme_options[icon]" value="<?php esc_attr_e( $options['icon'] ); ?>" />
<?php if($options['icon'] == TRUE) : ?>
<img style="max-width: 44px; vertical-align: top;margin: 0 0 0 20px;" src="<?php esc_attr_e( $options['icon'] ); ?>" alt="" />
<?php endif; ?>
</td>
</tr>
</table>
<h3><?php _e('Articles','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Excerpt','scapegoat'); ?></th>
<td>
<label for="scapegoat_theme_options[custom-excerpt]">
<input id="scapegoat_theme_options[custom-excerpt]" type="checkbox" name="scapegoat_theme_options[custom-excerpt]" value="1" <?php checked( '1', $options['custom-excerpt'] ); ?> /> <?php _e('automatic excerpts','scapegoat'); ?> <span class="description"><?php _e("if this is checked, you don't need more-tags",'scapegoat'); ?></span>
</label>
</td>
</tr>
</table>
<h3><?php _e('Navigation','scapegoat'); ?></h3>
<table class="form-table">
<!--<tr valign="top">
<th scope="row"><?php _e('Breadcrumb-Navigation','scapegoat'); ?></th>
<td>
<label for="scapegoat_theme_options[breadcrumb-show]">
<input id="scapegoat_theme_options[breadcrumb-show]" type="checkbox" name="scapegoat_theme_options[breadcrumb-show]" value="1" <?php checked( '1', $options['breadcrumb-show'] ); ?> /> <?php _e('show','scapegoat'); ?>
</label>
</td>
</tr>-->
<tr valign="top">
<th scope="row"><?php _e('Submenu','scapegoat'); ?></th>
<td>
<label for="scapegoat_theme_options[submenu-show]">
<input id="scapegoat_theme_options[submenu-show]" type="checkbox" name="scapegoat_theme_options[submenu-show]" value="1" <?php checked( '1', $options['submenu-show'] ); ?> /> <?php _e('show','scapegoat'); ?> <span class="description"><?php _e('at the top of the sidebar','scapegoat'); ?></span></td>
</label>
</td>
</tr>
</table>
<h3><?php _e('Frontpage','scapegoat'); ?></h3>
<table class="form-table">
<!--<tr valign="top">
<th scope="row"><?php _e('Frontpage Layout','scapegoat'); ?></th>
<td>
<label for="scapegoat_theme_options[frnt-page]">
<input id="scapegoat_theme_options[front-page]" type="checkbox" name="scapegoat_theme_options[front-page]" value="1" <?php checked( '1', $options['front-page'] ); ?> /> <?php _e('show','scapegoat'); ?> <span class="description"><?php _e('use custom frontpage layout','scapegoat'); ?></span></td>
</label>
</td>
</tr>-->
<tr valign="top">
<th scope="row"><?php _e('Header','scapegoat'); ?></th>
<td>
<label for="show-slider">
<input id="show-slider" type="radio" name="scapegoat_theme_options[header-option]" value="show-slider" <?php checked( 'show-slider' == $options['header-option'] ); ?> /> <?php _e('Slider','scapegoat'); ?>
</label>
<br />
<label for="show-header">
<input id="show-header" type="radio" name="scapegoat_theme_options[header-option]" value="show-header" <?php checked( 'show-header' == $options['header-option'] ); ?> /> <?php _e('Header','scapegoat'); ?>
</label>
<br />
<label for="show-none">
<input id="show-none" type="radio" name="scapegoat_theme_options[header-option]" value="show-none" <?php checked( 'show-none' == $options['header-option'] ); ?> /> <?php _e('Nothing','scapegoat'); ?>
</label>
</td>
</tr>
</table>
<h3><?php _e('Slider-settings','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Category (ID)','scapegoat'); ?></th>
<td><input id="scapegoat_theme_options[slider-cat]" class="small-text" type="text" name="scapegoat_theme_options[slider-cat]" value="<?php esc_attr_e( $options['slider-cat'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Amount of slides','scapegoat'); ?></th>
<td><input id="scapegoat_theme_options[slider-num]" class="small-text" type="text" name="scapegoat_theme_options[slider-num]" value="<?php esc_attr_e( $options['slider-num'] ); ?>" /> <span class="description"><?php _e('Slides','scapegoat'); ?></span></td>
</tr>
</table>
<h3><?php _e('Featured Links','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row">Link 1</th>
<td>
<input id="scapegoat_theme_options[featured-link-1]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-1]" value="<?php esc_attr_e( $options['featured-link-1'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_theme_options[featured-link-title-1]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-title-1]" value="<?php esc_attr_e( $options['featured-link-title-1'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 2</th>
<td>
<input id="scapegoat_theme_options[featured-link-2]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-2]" value="<?php esc_attr_e( $options['featured-link-2'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_theme_options[featured-link-title-2]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-title-2]" value="<?php esc_attr_e( $options['featured-link-title-2'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 3</th>
<td>
<input id="scapegoat_theme_options[featured-link-3]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-3]" value="<?php esc_attr_e( $options['featured-link-3'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_theme_options[featured-link-title-3]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-title-3]" value="<?php esc_attr_e( $options['featured-link-title-3'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row">Link 3</th>
<td>
<input id="scapegoat_theme_options[featured-link-4]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-4]" value="<?php esc_attr_e( $options['featured-link-4'] ); ?>" /> <span class="description">URL</span><br />
<input id="scapegoat_theme_options[featured-link-title-4]" class="regular-text" type="text" name="scapegoat_theme_options[featured-link-title-4]" value="<?php esc_attr_e( $options['featured-link-title-4'] ); ?>" /> <span class="description"><?php _e('Title','scapegoat'); ?></span>
</td>
</tr>
</table>
<h3><?php _e('Social Networks','scapegoat'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><span class="social-icon rss"></span> Feed</th>
<td><input id="scapegoat_theme_options[rss]" class="regular-text" type="text" name="scapegoat_theme_options[rss]" value="<?php esc_attr_e( $options['rss'] ); ?>" /> <span class="description"> <?php _e('if this is empty, the default Wordpress-feed will set','scapegoat'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon twitter"></span> Twitter</th>
<td><input id="scapegoat_theme_options[twitter]" class="regular-text" type="text" name="scapegoat_theme_options[twitter]" value="<?php esc_attr_e( $options['twitter'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon facebook"></span> Facebook</th>
<td><input id="scapegoat_theme_options[facebook]" class="regular-text" type="text" name="scapegoat_theme_options[facebook]" value="<?php esc_attr_e( $options['facebook'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon google"></span> Google +</th>
<td><input id="scapegoat_theme_options[google]" class="regular-text" type="text" name="scapegoat_theme_options[google]" value="<?php esc_attr_e( $options['google'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon youtube"></span> Youtube</th>
<td><input id="scapegoat_theme_options[youtube]" class="regular-text" type="text" name="scapegoat_theme_options[youtube]" value="<?php esc_attr_e( $options['youtube'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon mail"></span> Newsletter</th>
<td><input id="scapegoat_theme_options[mail]" class="regular-text" type="text" name="scapegoat_theme_options[mail]" value="<?php esc_attr_e( $options['mail'] ); ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><span class="social-icon podcast"></span> Podcast</th>
<td><input id="scapegoat_theme_options[podcast]" class="regular-text" type="text" name="scapegoat_theme_options[podcast]" value="<?php esc_attr_e( $options['podcast'] ); ?>" /></td>
</tr>
</table>
<!-- Submit -->
<p class="submit"><input type="submit" class="button-primary" value="<?php _e('Save','scapegoat'); ?>" /></p>
</form>
</div>
<?php }
function scapegoat_validate_options($input) {
// $input['copyright'] = wp_filter_nohtml_kses( $input['copyright'] );
return $input;
}
?>