1 <?php |
|
2 |
|
3 /* |
|
4 |
|
5 * |
|
6 |
|
7 * Require the framework class before doing anything else, so we can use the defined urls and dirs |
|
8 |
|
9 * Also if running on windows you may have url problems, which can be fixed by defining the framework url first |
|
10 |
|
11 * |
|
12 |
|
13 */ |
|
14 |
|
15 //define('NHP_OPTIONS_URL', site_url('path the options folder')); |
|
16 |
|
17 if(!class_exists('NHP_Options')){ |
|
18 |
|
19 require_once( dirname( __FILE__ ) . '/options/options.php' ); |
|
20 |
|
21 } |
|
22 |
|
23 |
|
24 |
|
25 /* |
|
26 |
|
27 * |
|
28 |
|
29 * Custom function for filtering the sections array given by theme, good for child themes to override or add to the sections. |
|
30 |
|
31 * Simply include this function in the child themes functions.php file. |
|
32 |
|
33 * |
|
34 |
|
35 * NOTE: the defined constansts for urls, and dir will NOT be available at this point in a child theme, so you must use |
|
36 |
|
37 * get_template_directory_uri() if you want to use any of the built in icons |
|
38 |
|
39 * |
|
40 |
|
41 */ |
|
42 |
|
43 function add_another_section($sections){ |
|
44 |
|
45 |
|
46 |
|
47 //$sections = array(); |
|
48 |
|
49 $sections[] = array( |
|
50 |
|
51 'title' => __('A Section added by hook', 'nhp-opts'), |
|
52 |
|
53 'desc' => __('<p class="description">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'nhp-opts'), |
|
54 |
|
55 //all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones. |
|
56 |
|
57 //You dont have to though, leave it blank for default. |
|
58 |
|
59 'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png', |
|
60 |
|
61 //Lets leave this as a blank section, no options just some intro text set above. |
|
62 |
|
63 'fields' => array() |
|
64 |
|
65 ); |
|
66 |
|
67 |
|
68 |
|
69 return $sections; |
|
70 |
|
71 |
|
72 |
|
73 }//function |
|
74 |
|
75 //add_filter('nhp-opts-sections-twenty_eleven', 'add_another_section'); |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 /* |
|
82 |
|
83 * |
|
84 |
|
85 * Custom function for filtering the args array given by theme, good for child themes to override or add to the args array. |
|
86 |
|
87 * |
|
88 |
|
89 */ |
|
90 |
|
91 function change_framework_args($args){ |
|
92 |
|
93 |
|
94 |
|
95 //$args['dev_mode'] = false; |
|
96 |
|
97 |
|
98 |
|
99 return $args; |
|
100 |
|
101 |
|
102 |
|
103 }//function |
|
104 |
|
105 //add_filter('nhp-opts-args-twenty_eleven', 'change_framework_args'); |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 /* |
|
126 |
|
127 * This is the meat of creating the optons page |
|
128 |
|
129 * |
|
130 |
|
131 * Override some of the default values, uncomment the args and change the values |
|
132 |
|
133 * - no $args are required, but there there to be over ridden if needed. |
|
134 |
|
135 * |
|
136 |
|
137 * |
|
138 |
|
139 */ |
|
140 |
|
141 |
|
142 |
|
143 function setup_framework_options(){ |
|
144 |
|
145 |
|
146 |
|
147 $google_fonts = array( |
|
148 |
|
149 'Abel' => "Abel", |
|
150 |
|
151 'Abril+Fatface' => "Abril Fatface", |
|
152 |
|
153 'Aclonica' => "Aclonica", |
|
154 |
|
155 'Actor' => "Actor", |
|
156 |
|
157 'Adamina' => "Adamina", |
|
158 |
|
159 'Aguafina+Script' => "Aguafina Script", |
|
160 |
|
161 'Aladin' => "Aladin", |
|
162 |
|
163 'Aldrich' => "Aldrich", |
|
164 |
|
165 'Alice' => "Alice", |
|
166 |
|
167 'Alike+Angular' => "Alike Angular", |
|
168 |
|
169 'Alike' => "Alike", |
|
170 |
|
171 'Allan' => "Allan", |
|
172 |
|
173 'Allerta+Stencil' => "Allerta Stencil", |
|
174 |
|
175 'Allerta' => "Allerta", |
|
176 |
|
177 'Amaranth' => "Amaranth", |
|
178 |
|
179 'Amatic+SC' => "Amatic SC", |
|
180 |
|
181 'Andada' => "Andada", |
|
182 |
|
183 'Andika' => "Andika", |
|
184 |
|
185 'Annie+Use+Your+Telescope' => "Annie Use Your Telescope", |
|
186 |
|
187 'Anonymous+Pro' => "Anonymous Pro", |
|
188 |
|
189 'Antic' => "Antic", |
|
190 |
|
191 'Anton' => "Anton", |
|
192 |
|
193 'Arapey' => "Arapey", |
|
194 |
|
195 'Architects+Daughter' => "Architects Daughter", |
|
196 |
|
197 'Arimo' => "Arimo", |
|
198 |
|
199 'Artifika' => "Artifika", |
|
200 |
|
201 'Arvo' => "Arvo", |
|
202 |
|
203 'Asset' => "Asset", |
|
204 |
|
205 'Astloch' => "Astloch", |
|
206 |
|
207 'Atomic+Age' => "Atomic Age", |
|
208 |
|
209 'Aubrey' => "Aubrey", |
|
210 |
|
211 'Bangers' => "Bangers", |
|
212 |
|
213 'Bentham' => "Bentham", |
|
214 |
|
215 'Bevan' => "Bevan", |
|
216 |
|
217 'Bigshot+One' => "Bigshot One", |
|
218 |
|
219 'Bitter' => "Bitter", |
|
220 |
|
221 'Black+Ops+One' => "Black Ops One", |
|
222 |
|
223 'Bowlby+One+SC' => "Bowlby One SC", |
|
224 |
|
225 'Bowlby+One' => "Bowlby One", |
|
226 |
|
227 'Brawler' => "Brawler", |
|
228 |
|
229 'Bubblegum+Sans' => "Bubblegum Sans", |
|
230 |
|
231 'Buda' => "Buda", |
|
232 |
|
233 'Butcherman+Caps' => "Butcherman Caps", |
|
234 |
|
235 'Cabin+Condensed' => "Cabin Condensed", |
|
236 |
|
237 'Cabin+Sketch' => "Cabin Sketch", |
|
238 |
|
239 'Cabin' => "Cabin", |
|
240 |
|
241 'Cagliostro' => "Cagliostro", |
|
242 |
|
243 'Calligraffitti' => "Calligraffitti", |
|
244 |
|
245 'Candal' => "Candal", |
|
246 |
|
247 'Cantarell' => "Cantarell", |
|
248 |
|
249 'Cardo' => "Cardo", |
|
250 |
|
251 'Carme' => "Carme", |
|
252 |
|
253 'Carter+One' => "Carter One", |
|
254 |
|
255 'Caudex' => "Caudex", |
|
256 |
|
257 'Cedarville+Cursive' => "Cedarville Cursive", |
|
258 |
|
259 'Changa+One' => "Changa One", |
|
260 |
|
261 'Cherry+Cream+Soda' => "Cherry Cream Soda", |
|
262 |
|
263 'Chewy' => "Chewy", |
|
264 |
|
265 'Chicle' => "Chicle", |
|
266 |
|
267 'Chivo' => "Chivo", |
|
268 |
|
269 'Coda+Caption' => "Coda Caption", |
|
270 |
|
271 'Coda' => "Coda", |
|
272 |
|
273 'Comfortaa' => "Comfortaa", |
|
274 |
|
275 'Coming+Soon' => "Coming Soon", |
|
276 |
|
277 'Contrail+One' => "Contrail One", |
|
278 |
|
279 'Convergence' => "Convergence", |
|
280 |
|
281 'Cookie' => "Cookie", |
|
282 |
|
283 'Copse' => "Copse", |
|
284 |
|
285 'Corben' => "Corben", |
|
286 |
|
287 'Cousine' => "Cousine", |
|
288 |
|
289 'Coustard' => "Coustard", |
|
290 |
|
291 'Covered+By+Your+Grace' => "Covered By Your Grace", |
|
292 |
|
293 'Crafty+Girls' => "Crafty Girls", |
|
294 |
|
295 'Creepster+Caps' => "Creepster Caps", |
|
296 |
|
297 'Crimson+Text' => "Crimson Text", |
|
298 |
|
299 'Crushed' => "Crushed", |
|
300 |
|
301 'Cuprum' => "Cuprum", |
|
302 |
|
303 'Damion' => "Damion", |
|
304 |
|
305 'Dancing+Script' => "Dancing Script", |
|
306 |
|
307 'Dawning+of+a+New+Day' => "Dawning of a New Day", |
|
308 |
|
309 'Days+One' => "Days One", |
|
310 |
|
311 'Delius+Swash+Caps' => "Delius Swash Caps", |
|
312 |
|
313 'Delius+Unicase' => "Delius Unicase", |
|
314 |
|
315 'Delius' => "Delius", |
|
316 |
|
317 'Devonshire' => "Devonshire", |
|
318 |
|
319 'Didact+Gothic' => "Didact Gothic", |
|
320 |
|
321 'Dorsa' => "Dorsa", |
|
322 |
|
323 'Dr+Sugiyama' => "Dr Sugiyama", |
|
324 |
|
325 'Droid+Sans+Mono' => "Droid Sans Mono", |
|
326 |
|
327 'Droid+Sans' => "Droid Sans", |
|
328 |
|
329 'Droid+Serif' => "Droid Serif", |
|
330 |
|
331 'EB+Garamond' => "EB Garamond", |
|
332 |
|
333 'Eater+Caps' => "Eater Caps", |
|
334 |
|
335 'Expletus+Sans' => "Expletus Sans", |
|
336 |
|
337 'Fanwood+Text' => "Fanwood Text", |
|
338 |
|
339 'Federant' => "Federant", |
|
340 |
|
341 'Federo' => "Federo", |
|
342 |
|
343 'Fjord+One' => "Fjord One", |
|
344 |
|
345 'Fondamento' => "Fondamento", |
|
346 |
|
347 'Fontdiner+Swanky' => "Fontdiner Swanky", |
|
348 |
|
349 'Forum' => "Forum", |
|
350 |
|
351 'Francois+One' => "Francois One", |
|
352 |
|
353 'Gentium+Basic' => "Gentium Basic", |
|
354 |
|
355 'Gentium+Book+Basic' => "Gentium Book Basic", |
|
356 |
|
357 'Geo' => "Geo", |
|
358 |
|
359 'Geostar+Fill' => "Geostar Fill", |
|
360 |
|
361 'Geostar' => "Geostar", |
|
362 |
|
363 'Give+You+Glory' => "Give You Glory", |
|
364 |
|
365 'Gloria+Hallelujah' => "Gloria Hallelujah", |
|
366 |
|
367 'Goblin+One' => "Goblin One", |
|
368 |
|
369 'Gochi+Hand' => "Gochi Hand", |
|
370 |
|
371 'Goudy+Bookletter+1911' => "Goudy Bookletter 1911", |
|
372 |
|
373 'Gravitas+One' => "Gravitas One", |
|
374 |
|
375 'Gruppo' => "Gruppo", |
|
376 |
|
377 'Hammersmith+One' => "Hammersmith One", |
|
378 |
|
379 'Herr+Von+Muellerhoff' => "Herr Von Muellerhoff", |
|
380 |
|
381 'Holtwood+One+SC' => "Holtwood One SC", |
|
382 |
|
383 'Homemade+Apple' => "Homemade Apple", |
|
384 |
|
385 'IM+Fell+DW+Pica+SC' => "IM Fell DW Pica SC", |
|
386 |
|
387 'IM+Fell+DW+Pica' => "IM Fell DW Pica", |
|
388 |
|
389 'IM+Fell+Double+Pica+SC' => "IM Fell Double Pica SC", |
|
390 |
|
391 'IM+Fell+Double+Pica' => "IM Fell Double Pica", |
|
392 |
|
393 'IM+Fell+English+SC' => "IM Fell English SC", |
|
394 |
|
395 'IM+Fell+English' => "IM Fell English", |
|
396 |
|
397 'IM+Fell+French+Canon+SC' => "IM Fell French Canon SC", |
|
398 |
|
399 'IM+Fell+French+Canon' => "IM Fell French Canon", |
|
400 |
|
401 'IM+Fell+Great+Primer+SC' => "IM Fell Great Primer SC", |
|
402 |
|
403 'IM+Fell+Great+Primer' => "IM Fell Great Primer", |
|
404 |
|
405 'Iceland' => "Iceland", |
|
406 |
|
407 'Inconsolata' => "Inconsolata", |
|
408 |
|
409 'Indie+Flower' => "Indie Flower", |
|
410 |
|
411 'Irish+Grover' => "Irish Grover", |
|
412 |
|
413 'Istok+Web' => "Istok Web", |
|
414 |
|
415 'Jockey+One' => "Jockey One", |
|
416 |
|
417 'Josefin+Sans' => "Josefin Sans", |
|
418 |
|
419 'Josefin+Slab' => "Josefin Slab", |
|
420 |
|
421 'Judson' => "Judson", |
|
422 |
|
423 'Julee' => "Julee", |
|
424 |
|
425 'Jura' => "Jura", |
|
426 |
|
427 'Just+Another+Hand' => "Just Another Hand", |
|
428 |
|
429 'Just+Me+Again+Down+Here' => "Just Me Again Down Here", |
|
430 |
|
431 'Kameron' => "Kameron", |
|
432 |
|
433 'Kelly+Slab' => "Kelly Slab", |
|
434 |
|
435 'Kenia' => "Kenia", |
|
436 |
|
437 'Knewave' => "Knewave", |
|
438 |
|
439 'Kranky' => "Kranky", |
|
440 |
|
441 'Kreon' => "Kreon", |
|
442 |
|
443 'Kristi' => "Kristi", |
|
444 |
|
445 'La+Belle+Aurore' => "La Belle Aurore", |
|
446 |
|
447 'Lancelot' => "Lancelot", |
|
448 |
|
449 'Lato' => "Lato", |
|
450 |
|
451 'League+Script' => "League Script", |
|
452 |
|
453 'Leckerli+One' => "Leckerli One", |
|
454 |
|
455 'Lekton' => "Lekton", |
|
456 |
|
457 'Lemon' => "Lemon", |
|
458 |
|
459 'Limelight' => "Limelight", |
|
460 |
|
461 'Linden+Hill' => "Linden Hill", |
|
462 |
|
463 'Lobster+Two' => "Lobster Two", |
|
464 |
|
465 'Lobster' => "Lobster", |
|
466 |
|
467 'Lora' => "Lora", |
|
468 |
|
469 'Love+Ya+Like+A+Sister' => "Love Ya Like A Sister", |
|
470 |
|
471 'Loved+by+the+King' => "Loved by the King", |
|
472 |
|
473 'Luckiest+Guy' => "Luckiest Guy", |
|
474 |
|
475 'Maiden+Orange' => "Maiden Orange", |
|
476 |
|
477 'Mako' => "Mako", |
|
478 |
|
479 'Marck+Script' => "Marck Script", |
|
480 |
|
481 'Marvel' => "Marvel", |
|
482 |
|
483 'Mate+SC' => "Mate SC", |
|
484 |
|
485 'Mate' => "Mate", |
|
486 |
|
487 'Maven+Pro' => "Maven Pro", |
|
488 |
|
489 'Meddon' => "Meddon", |
|
490 |
|
491 'MedievalSharp' => "MedievalSharp", |
|
492 |
|
493 'Megrim' => "Megrim", |
|
494 |
|
495 'Merienda+One' => "Merienda One", |
|
496 |
|
497 'Merriweather' => "Merriweather", |
|
498 |
|
499 'Metrophobic' => "Metrophobic", |
|
500 |
|
501 'Michroma' => "Michroma", |
|
502 |
|
503 'Miltonian+Tattoo' => "Miltonian Tattoo", |
|
504 |
|
505 'Miltonian' => "Miltonian", |
|
506 |
|
507 'Miss+Fajardose' => "Miss Fajardose", |
|
508 |
|
509 'Miss+Saint+Delafield' => "Miss Saint Delafield", |
|
510 |
|
511 'Modern+Antiqua' => "Modern Antiqua", |
|
512 |
|
513 'Molengo' => "Molengo", |
|
514 |
|
515 'Monofett' => "Monofett", |
|
516 |
|
517 'Monoton' => "Monoton", |
|
518 |
|
519 'Monsieur+La+Doulaise' => "Monsieur La Doulaise", |
|
520 |
|
521 'Montez' => "Montez", |
|
522 |
|
523 'Mountains+of+Christmas' => "Mountains of Christmas", |
|
524 |
|
525 'Mr+Bedford' => "Mr Bedford", |
|
526 |
|
527 'Mr+Dafoe' => "Mr Dafoe", |
|
528 |
|
529 'Mr+De+Haviland' => "Mr De Haviland", |
|
530 |
|
531 'Mrs+Sheppards' => "Mrs Sheppards", |
|
532 |
|
533 'Muli' => "Muli", |
|
534 |
|
535 'Neucha' => "Neucha", |
|
536 |
|
537 'Neuton' => "Neuton", |
|
538 |
|
539 'News+Cycle' => "News Cycle", |
|
540 |
|
541 'Niconne' => "Niconne", |
|
542 |
|
543 'Nixie+One' => "Nixie One", |
|
544 |
|
545 'Nobile' => "Nobile", |
|
546 |
|
547 'Nosifer+Caps' => "Nosifer Caps", |
|
548 |
|
549 'Nothing+You+Could+Do' => "Nothing You Could Do", |
|
550 |
|
551 'Nova+Cut' => "Nova Cut", |
|
552 |
|
553 'Nova+Flat' => "Nova Flat", |
|
554 |
|
555 'Nova+Mono' => "Nova Mono", |
|
556 |
|
557 'Nova+Oval' => "Nova Oval", |
|
558 |
|
559 'Nova+Round' => "Nova Round", |
|
560 |
|
561 'Nova+Script' => "Nova Script", |
|
562 |
|
563 'Nova+Slim' => "Nova Slim", |
|
564 |
|
565 'Nova+Square' => "Nova Square", |
|
566 |
|
567 'Numans' => "Numans", |
|
568 |
|
569 'Nunito' => "Nunito", |
|
570 |
|
571 'Old+Standard+TT' => "Old Standard TT", |
|
572 |
|
573 'Open+Sans+Condensed' => "Open Sans Condensed", |
|
574 |
|
575 'Open+Sans' => "Open Sans", |
|
576 |
|
577 'Orbitron' => "Orbitron", |
|
578 |
|
579 'Oswald' => "Oswald", |
|
580 |
|
581 'Over+the+Rainbow' => "Over the Rainbow", |
|
582 |
|
583 'Ovo' => "Ovo", |
|
584 |
|
585 'PT+Sans+Caption' => "PT Sans Caption", |
|
586 |
|
587 'PT+Sans+Narrow' => "PT Sans Narrow", |
|
588 |
|
589 'PT+Sans' => "PT Sans", |
|
590 |
|
591 'PT+Serif+Caption' => "PT Serif Caption", |
|
592 |
|
593 'PT+Serif' => "PT Serif", |
|
594 |
|
595 'Pacifico' => "Pacifico", |
|
596 |
|
597 'Passero+One' => "Passero One", |
|
598 |
|
599 'Patrick+Hand' => "Patrick Hand", |
|
600 |
|
601 'Paytone+One' => "Paytone One", |
|
602 |
|
603 'Permanent+Marker' => "Permanent Marker", |
|
604 |
|
605 'Petrona' => "Petrona", |
|
606 |
|
607 'Philosopher' => "Philosopher", |
|
608 |
|
609 'Piedra' => "Piedra", |
|
610 |
|
611 'Pinyon+Script' => "Pinyon Script", |
|
612 |
|
613 'Play' => "Play", |
|
614 |
|
615 'Playfair+Display' => "Playfair Display", |
|
616 |
|
617 'Podkova' => "Podkova", |
|
618 |
|
619 'Poller+One' => "Poller One", |
|
620 |
|
621 'Poly' => "Poly", |
|
622 |
|
623 'Pompiere' => "Pompiere", |
|
624 |
|
625 'Prata' => "Prata", |
|
626 |
|
627 'Prociono' => "Prociono", |
|
628 |
|
629 'Puritan' => "Puritan", |
|
630 |
|
631 'Quattrocento+Sans' => "Quattrocento Sans", |
|
632 |
|
633 'Quattrocento' => "Quattrocento", |
|
634 |
|
635 'Questrial' => "Questrial", |
|
636 |
|
637 'Quicksand' => "Quicksand", |
|
638 |
|
639 'Radley' => "Radley", |
|
640 |
|
641 'Raleway' => "Raleway", |
|
642 |
|
643 'Rammetto+One' => "Rammetto One", |
|
644 |
|
645 'Rancho' => "Rancho", |
|
646 |
|
647 'Rationale' => "Rationale", |
|
648 |
|
649 'Redressed' => "Redressed", |
|
650 |
|
651 'Reenie+Beanie' => "Reenie Beanie", |
|
652 |
|
653 'Ribeye+Marrow' => "Ribeye Marrow", |
|
654 |
|
655 'Ribeye' => "Ribeye", |
|
656 |
|
657 'Righteous' => "Righteous", |
|
658 |
|
659 'Rochester' => "Rochester", |
|
660 |
|
661 'Rock+Salt' => "Rock Salt", |
|
662 |
|
663 'Rokkitt' => "Rokkitt", |
|
664 |
|
665 'Rosario' => "Rosario", |
|
666 |
|
667 'Ruslan+Display' => "Ruslan Display", |
|
668 |
|
669 'Salsa' => "Salsa", |
|
670 |
|
671 'Sancreek' => "Sancreek", |
|
672 |
|
673 'Sansita+One' => "Sansita One", |
|
674 |
|
675 'Satisfy' => "Satisfy", |
|
676 |
|
677 'Schoolbell' => "Schoolbell", |
|
678 |
|
679 'Shadows+Into+Light' => "Shadows Into Light", |
|
680 |
|
681 'Shanti' => "Shanti", |
|
682 |
|
683 'Short+Stack' => "Short Stack", |
|
684 |
|
685 'Sigmar+One' => "Sigmar One", |
|
686 |
|
687 'Signika+Negative' => "Signika Negative", |
|
688 |
|
689 'Signika' => "Signika", |
|
690 |
|
691 'Six+Caps' => "Six Caps", |
|
692 |
|
693 'Slackey' => "Slackey", |
|
694 |
|
695 'Smokum' => "Smokum", |
|
696 |
|
697 'Smythe' => "Smythe", |
|
698 |
|
699 'Sniglet' => "Sniglet", |
|
700 |
|
701 'Snippet' => "Snippet", |
|
702 |
|
703 'Sorts+Mill+Goudy' => "Sorts Mill Goudy", |
|
704 |
|
705 'Source+Sans+Pro' => "Source Sans Pro", |
|
706 |
|
707 'Special+Elite' => "Special Elite", |
|
708 |
|
709 'Spinnaker' => "Spinnaker", |
|
710 |
|
711 'Spirax' => "Spirax", |
|
712 |
|
713 'Stardos+Stencil' => "Stardos Stencil", |
|
714 |
|
715 'Sue+Ellen+Francisco' => "Sue Ellen Francisco", |
|
716 |
|
717 'Sunshiney' => "Sunshiney", |
|
718 |
|
719 'Supermercado+One' => "Supermercado One", |
|
720 |
|
721 'Swanky+and+Moo+Moo' => "Swanky and Moo Moo", |
|
722 |
|
723 'Syncopate' => "Syncopate", |
|
724 |
|
725 'Tangerine' => "Tangerine", |
|
726 |
|
727 'Tenor+Sans' => "Tenor Sans", |
|
728 |
|
729 'Terminal+Dosis' => "Terminal Dosis", |
|
730 |
|
731 'The+Girl+Next+Door' => "The Girl Next Door", |
|
732 |
|
733 'Tienne' => "Tienne", |
|
734 |
|
735 'Tinos' => "Tinos", |
|
736 |
|
737 'Tulpen+One' => "Tulpen One", |
|
738 |
|
739 'Ubuntu+Condensed' => "Ubuntu Condensed", |
|
740 |
|
741 'Ubuntu+Mono' => "Ubuntu Mono", |
|
742 |
|
743 'Ubuntu' => "Ubuntu", |
|
744 |
|
745 'Ultra' => "Ultra", |
|
746 |
|
747 'UnifrakturCook' => "UnifrakturCook", |
|
748 |
|
749 'UnifrakturMaguntia' => "UnifrakturMaguntia", |
|
750 |
|
751 'Unkempt' => "Unkempt", |
|
752 |
|
753 'Unlock' => "Unlock", |
|
754 |
|
755 'Unna' => "Unna", |
|
756 |
|
757 'VT323' => "VT323", |
|
758 |
|
759 'Varela+Round' => "Varela Round", |
|
760 |
|
761 'Varela' => "Varela", |
|
762 |
|
763 'Vast+Shadow' => "Vast Shadow", |
|
764 |
|
765 'Vibur' => "Vibur", |
|
766 |
|
767 'Vidaloka' => "Vidaloka", |
|
768 |
|
769 'Volkhov' => "Volkhov", |
|
770 |
|
771 'Vollkorn' => "Vollkorn", |
|
772 |
|
773 'Voltaire' => "Voltaire", |
|
774 |
|
775 'Waiting+for+the+Sunrise' => "Waiting for the Sunrise", |
|
776 |
|
777 'Wallpoet' => "Wallpoet", |
|
778 |
|
779 'Walter+Turncoat' => "Walter Turncoat", |
|
780 |
|
781 'Wire+One' => "Wire One", |
|
782 |
|
783 'Yanone+Kaffeesatz' => "Yanone Kaffeesatz", |
|
784 |
|
785 'Yellowtail' => "Yellowtail", |
|
786 |
|
787 'Yeseva+One' => "Yeseva One", |
|
788 |
|
789 'Zeyada' => "Zeyada", |
|
790 |
|
791 ); |
|
792 |
|
793 $args = array(); |
|
794 |
|
795 |
|
796 |
|
797 //Set it to dev mode to view the class settings/info in the form - default is false |
|
798 |
|
799 $args['dev_mode'] = true; |
|
800 |
|
801 |
|
802 |
|
803 //google api key MUST BE DEFINED IF YOU WANT TO USE GOOGLE WEBFONTS |
|
804 |
|
805 //$args['google_api_key'] = '***'; |
|
806 |
|
807 |
|
808 |
|
809 //Remove the default stylesheet? make sure you enqueue another one all the page will look whack! |
|
810 |
|
811 //$args['stylesheet_override'] = true; |
|
812 |
|
813 |
|
814 |
|
815 //Add HTML before the form |
|
816 |
|
817 //$args['intro_text'] = __('<p>Don\'t forget to save the settings!</p>', 'nhp-opts'); |
|
818 |
|
819 |
|
820 |
|
821 //Setup custom links in the footer for share icons |
|
822 |
|
823 $args['share_icons']['facebook'] = array( |
|
824 |
|
825 'link' => 'http://www.facebook.com/finaldestiny16', |
|
826 |
|
827 'title' => 'My facebook account', |
|
828 |
|
829 'img' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_320_facebook.png' |
|
830 |
|
831 ); |
|
832 |
|
833 $args['share_icons']['themeforest'] = array( |
|
834 |
|
835 'link' => 'http://themeforest.net/user/FinalDestiny', |
|
836 |
|
837 'title' => 'My themeforest account', |
|
838 |
|
839 'img' => NHP_OPTIONS_URL . 'img/glyphicons/glyphicons_050_link.png' |
|
840 |
|
841 ); |
|
842 |
|
843 //Choose to disable the import/export feature |
|
844 |
|
845 //$args['show_import_export'] = false; |
|
846 |
|
847 |
|
848 |
|
849 //Choose a custom option name for your theme options, the default is the theme name in lowercase with spaces replaced by underscores |
|
850 |
|
851 $args['opt_name'] = 'scrn'; |
|
852 |
|
853 |
|
854 |
|
855 $args['google_api_key'] = 'AIzaSyB0_zr4gsc6PkFl5UiHDj6ROiXtuYb7QBk'; |
|
856 |
|
857 |
|
858 |
|
859 //Custom menu icon |
|
860 |
|
861 //$args['menu_icon'] = ''; |
|
862 |
|
863 |
|
864 |
|
865 //Custom menu title for options page - default is "Options" |
|
866 |
|
867 $args['menu_title'] = __('SCRN Options', 'nhp-opts'); |
|
868 |
|
869 |
|
870 |
|
871 //Custom Page Title for options page - default is "Options" |
|
872 |
|
873 $args['page_title'] = __('SCRN Theme Options', 'nhp-opts'); |
|
874 |
|
875 |
|
876 |
|
877 //Custom page slug for options page (wp-admin/themes.php?page=***) - default is "nhp_theme_options" |
|
878 |
|
879 $args['page_slug'] = 'scrn_options'; |
|
880 |
|
881 |
|
882 |
|
883 //Custom page capability - default is set to "manage_options" |
|
884 |
|
885 //$args['page_cap'] = 'manage_options'; |
|
886 |
|
887 |
|
888 |
|
889 //page type - "menu" (adds a top menu section) or "submenu" (adds a submenu) - default is set to "menu" |
|
890 |
|
891 //$args['page_type'] = 'submenu'; |
|
892 |
|
893 |
|
894 |
|
895 //parent menu - default is set to "themes.php" (Appearance) |
|
896 |
|
897 //the list of available parent menus is available here: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters |
|
898 |
|
899 //$args['page_parent'] = 'themes.php'; |
|
900 |
|
901 |
|
902 |
|
903 //custom page location - default 100 - must be unique or will override other items |
|
904 |
|
905 $args['page_position'] = 27; |
|
906 |
|
907 |
|
908 |
|
909 $args['footer_credit'] = ''; |
|
910 |
|
911 |
|
912 |
|
913 //Custom page icon class (used to override the page icon next to heading) |
|
914 |
|
915 //$args['page_icon'] = 'icon-themes'; |
|
916 |
|
917 |
|
918 |
|
919 //Want to disable the sections showing as a submenu in the admin? uncomment this line |
|
920 |
|
921 //$args['allow_sub_menu'] = false; |
|
922 |
|
923 |
|
924 |
|
925 //Set ANY custom page help tabs - displayed using the new help tab API, show in order of definition |
|
926 |
|
927 $args['help_tabs'][] = array( |
|
928 |
|
929 'id' => 'nhp-opts-1', |
|
930 |
|
931 'title' => __('Theme Information 1', 'nhp-opts'), |
|
932 |
|
933 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'nhp-opts') |
|
934 |
|
935 ); |
|
936 |
|
937 $args['help_tabs'][] = array( |
|
938 |
|
939 'id' => 'nhp-opts-2', |
|
940 |
|
941 'title' => __('Theme Information 2', 'nhp-opts'), |
|
942 |
|
943 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'nhp-opts') |
|
944 |
|
945 ); |
|
946 |
|
947 |
|
948 |
|
949 //Set the Help Sidebar for the options page - no sidebar by default |
|
950 |
|
951 $args['help_sidebar'] = __('<p>This is the sidebar content, HTML is allowed.</p>', 'nhp-opts'); |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
|
958 |
|
959 $sections = array(); |
|
960 |
|
961 |
|
962 |
|
963 $sections[] = array( |
|
964 |
|
965 'title' => __('General Settings', 'nhp-opts'), |
|
966 |
|
967 'desc' => __('<p class="description">Here you can configure the general aspects of the theme.!</p>', 'nhp-opts'), |
|
968 |
|
969 //all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones. |
|
970 |
|
971 //You dont have to though, leave it blank for default. |
|
972 |
|
973 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_062_attach.png', |
|
974 |
|
975 'fields' => array( |
|
976 |
|
977 array( |
|
978 |
|
979 'id' => 'favicon', |
|
980 |
|
981 'type' => 'upload', |
|
982 |
|
983 'title' => 'Favicon', |
|
984 |
|
985 'sub_desc' => 'This is the little icon in the address bar for your website' |
|
986 |
|
987 ), |
|
988 |
|
989 array( |
|
990 |
|
991 'id' => 'superadmin', |
|
992 |
|
993 'type' => 'text', |
|
994 |
|
995 'title' => 'Super admin username', |
|
996 |
|
997 'sub_desc' => '<strong>You can show the Theme options just for one admin user with this option! BE CAREFUL WITH THIS ONE!</strong>.', |
|
998 |
|
999 'std' => '' |
|
1000 |
|
1001 ), |
|
1002 |
|
1003 array( |
|
1004 |
|
1005 'id' => 'email', |
|
1006 |
|
1007 'type' => 'text', |
|
1008 |
|
1009 'title' => 'Contact form e-mail', |
|
1010 |
|
1011 'sub_desc' => 'This is the e-mail where you\'ll receive all the messages from the contact page', |
|
1012 |
|
1013 'std' => get_bloginfo('admin_email') |
|
1014 |
|
1015 ), |
|
1016 |
|
1017 array( |
|
1018 |
|
1019 'id' => 'wordpress_version', |
|
1020 |
|
1021 'type' => 'button_set', |
|
1022 |
|
1023 'options' => array('1' => 'Yes', '0' => 'No'), |
|
1024 |
|
1025 'title' => 'Show the wordpress version in your source code?', |
|
1026 |
|
1027 'std' => 1 |
|
1028 |
|
1029 ), |
|
1030 |
|
1031 array( |
|
1032 |
|
1033 'id' => 'blog_page', |
|
1034 |
|
1035 'type' => 'pages_multi_select', |
|
1036 |
|
1037 'title' => 'Page used for the blog page', |
|
1038 |
|
1039 'sub_desc' => 'This will be added in the menu if you don\'t setup the menu in Appearance > Menus', |
|
1040 |
|
1041 'args' => array(), |
|
1042 |
|
1043 'std' => '' |
|
1044 |
|
1045 ), |
|
1046 |
|
1047 array( |
|
1048 |
|
1049 'id' => 'topheader_text', |
|
1050 |
|
1051 'type' => 'text', |
|
1052 |
|
1053 'title' => 'Top header text', |
|
1054 |
|
1055 'sub_desc' => 'This is the top header text, like Welcome on our demo.', |
|
1056 |
|
1057 'std' => 'Hello' |
|
1058 |
|
1059 ), |
|
1060 |
|
1061 array( |
|
1062 |
|
1063 'id' => 'topheader_smalltext', |
|
1064 |
|
1065 'type' => 'text', |
|
1066 |
|
1067 'title' => 'Top header small text', |
|
1068 |
|
1069 'sub_desc' => 'This appears under the top header text above. Some little description about you here.', |
|
1070 |
|
1071 'std' => 'Welcome to scrn' |
|
1072 |
|
1073 ), |
|
1074 |
|
1075 array( |
|
1076 |
|
1077 'id' => 'topheader_smallertext', |
|
1078 |
|
1079 'type' => 'text', |
|
1080 |
|
1081 'title' => 'Top header smaller text', |
|
1082 |
|
1083 'sub_desc' => 'This appears after the small text on the homepage, some more info about you here.', |
|
1084 |
|
1085 'std' => 'Don\'t be too proud of this technological terror you\'ve constructed. <br />The ability to destroy a planet is insignificant next to the power of the Force.' |
|
1086 |
|
1087 ), |
|
1088 |
|
1089 array( |
|
1090 |
|
1091 'id' => 'phone', |
|
1092 |
|
1093 'type' => 'text', |
|
1094 |
|
1095 'title' => 'Phone', |
|
1096 |
|
1097 'sub_desc' => 'The phone shows up in the contact form.', |
|
1098 |
|
1099 'std' => '' |
|
1100 |
|
1101 ), |
|
1102 |
|
1103 array( |
|
1104 |
|
1105 'id' => 'location', |
|
1106 |
|
1107 'type' => 'text', |
|
1108 |
|
1109 'title' => 'Location', |
|
1110 |
|
1111 'sub_desc' => 'The location shows up in the contact form.', |
|
1112 |
|
1113 'std' => '' |
|
1114 |
|
1115 ), |
|
1116 |
|
1117 array( |
|
1118 |
|
1119 'id' => 'custom_css', |
|
1120 |
|
1121 'type' => 'textarea', |
|
1122 |
|
1123 'title' => 'Custom CSS', |
|
1124 |
|
1125 'sub_desc' => 'Include here any custom CSS you want, it will be kept when updating the theme' |
|
1126 |
|
1127 ), |
|
1128 |
|
1129 array( |
|
1130 |
|
1131 'id' => 'contact_description', |
|
1132 |
|
1133 'type' => 'text', |
|
1134 |
|
1135 'title' => 'Header description on the contact page', |
|
1136 |
|
1137 'sub_desc' => 'Shows up under the Contact title on the homepage.', |
|
1138 |
|
1139 'std' => '' |
|
1140 |
|
1141 ), |
|
1142 |
|
1143 array( |
|
1144 |
|
1145 'id' => 'facebook_url', |
|
1146 |
|
1147 'type' => 'text', |
|
1148 |
|
1149 'title' => 'Facebook URL', |
|
1150 |
|
1151 'sub_desc' => 'Shows up on the first page. Leave empty if not used.' |
|
1152 |
|
1153 ), |
|
1154 |
|
1155 array( |
|
1156 |
|
1157 'id' => 'twitter_username', |
|
1158 |
|
1159 'type' => 'text', |
|
1160 |
|
1161 'title' => 'Twitter username', |
|
1162 |
|
1163 'sub_desc' => 'Shows up on the first page and is used in the twitter updates shortcode. Leave empty if not used.', |
|
1164 |
|
1165 'std' => '' |
|
1166 |
|
1167 ), |
|
1168 |
|
1169 array( |
|
1170 |
|
1171 'id' => 'gplus_url', |
|
1172 |
|
1173 'type' => 'text', |
|
1174 |
|
1175 'title' => 'Google+ URL', |
|
1176 |
|
1177 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1178 |
|
1179 'std' => '' |
|
1180 |
|
1181 ), |
|
1182 |
|
1183 array( |
|
1184 |
|
1185 'id' => 'dribble_url', |
|
1186 |
|
1187 'type' => 'text', |
|
1188 |
|
1189 'title' => 'Dribble URL', |
|
1190 |
|
1191 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1192 |
|
1193 'std' => '' |
|
1194 |
|
1195 ), |
|
1196 |
|
1197 array( |
|
1198 |
|
1199 'id' => 'linkedin_url', |
|
1200 |
|
1201 'type' => 'text', |
|
1202 |
|
1203 'title' => 'Linkedin URL', |
|
1204 |
|
1205 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1206 |
|
1207 'std' => '' |
|
1208 |
|
1209 ), |
|
1210 |
|
1211 array( |
|
1212 |
|
1213 'id' => 'skype_url', |
|
1214 |
|
1215 'type' => 'text', |
|
1216 |
|
1217 'title' => 'Skype URL', |
|
1218 |
|
1219 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1220 |
|
1221 'std' => '' |
|
1222 |
|
1223 ), |
|
1224 |
|
1225 array( |
|
1226 |
|
1227 'id' => 'pinterest_url', |
|
1228 |
|
1229 'type' => 'text', |
|
1230 |
|
1231 'title' => 'Pinterest URL', |
|
1232 |
|
1233 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1234 |
|
1235 'std' => '' |
|
1236 |
|
1237 ), |
|
1238 |
|
1239 array( |
|
1240 |
|
1241 'id' => 'vimeo_url', |
|
1242 |
|
1243 'type' => 'text', |
|
1244 |
|
1245 'title' => 'Vimeo URL', |
|
1246 |
|
1247 'sub_desc' => 'Shows up on the first page. Leave empty if not used.', |
|
1248 |
|
1249 'std' => '' |
|
1250 |
|
1251 ) |
|
1252 |
|
1253 ) |
|
1254 |
|
1255 ); |
|
1256 |
|
1257 |
|
1258 |
|
1259 $sections[] = array( |
|
1260 |
|
1261 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_150_check.png', |
|
1262 |
|
1263 'title' => __('Navigation', 'nhp-opts'), |
|
1264 |
|
1265 'desc' => __('<p class="description">This area controls the menu(if it\'s not setup in Appearance -> Menus and the Breadcrumbs section. </p>', 'nhp-opts'), |
|
1266 |
|
1267 'fields' => array( |
|
1268 |
|
1269 array( |
|
1270 |
|
1271 'id' => 'pages_topmenu', |
|
1272 |
|
1273 'type' => 'pages_multi_select', |
|
1274 |
|
1275 'title' => __('Pages to include in the top menu', 'nhp-opts'), |
|
1276 |
|
1277 'sub_desc' => __('Choose what pages you want in the top menu.', 'nhp-opts'), |
|
1278 |
|
1279 'args' => '', |
|
1280 |
|
1281 'std' => '' |
|
1282 |
|
1283 ), |
|
1284 |
|
1285 array( |
|
1286 |
|
1287 'id' => 'menu_homelink', |
|
1288 |
|
1289 'type' => 'button_set', |
|
1290 |
|
1291 'options' => array('1' => 'Yes', '0' => 'No'), |
|
1292 |
|
1293 'title' => 'Show a home link in the top menu?', |
|
1294 |
|
1295 'sub_desc' => '<strong>This will work only if you didn\'t set a menu in Appearance -> Menus.</strong>', |
|
1296 |
|
1297 'std' => 1 |
|
1298 |
|
1299 ) |
|
1300 |
|
1301 ) |
|
1302 |
|
1303 ); |
|
1304 |
|
1305 $sections[] = array( |
|
1306 |
|
1307 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_157_show_lines.png', |
|
1308 |
|
1309 'title' => __('Integration', 'nhp-opts'), |
|
1310 |
|
1311 'desc' => __('<p class="description">Use this to integrate google analytics code or to add any meta tag / html code you want.</p>', 'nhp-opts'), |
|
1312 |
|
1313 'fields' => array( |
|
1314 |
|
1315 array( |
|
1316 |
|
1317 'id' => 'integration_footer', |
|
1318 |
|
1319 'type' => 'textarea', |
|
1320 |
|
1321 'title' => __('Code before the </body> tag', 'nhp-opts'), |
|
1322 |
|
1323 'sub_desc' => __('<strong>Use this one for google analytics for example.</strong>', 'nhp-opts'), |
|
1324 |
|
1325 'std' => '' |
|
1326 |
|
1327 ), |
|
1328 |
|
1329 array( |
|
1330 |
|
1331 'id' => 'integration_header', |
|
1332 |
|
1333 'type' => 'textarea', |
|
1334 |
|
1335 'title' => __('The code will be added before the </head> tag', 'nhp-opts'), |
|
1336 |
|
1337 'sub_desc' => __('Use this one if you want to verify your site for google/bing/alexa/etc for example.', 'nhp-opts'), |
|
1338 |
|
1339 'std' => '' |
|
1340 |
|
1341 ), |
|
1342 |
|
1343 ) |
|
1344 |
|
1345 ); |
|
1346 |
|
1347 $sections[] = array( |
|
1348 |
|
1349 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_107_text_resize.png', |
|
1350 |
|
1351 'title' => __('Colorization & Fonts', 'nhp-opts'), |
|
1352 |
|
1353 'desc' => __('<p class="description">This is the Description. Again HTML is allowed</p>', 'nhp-opts'), |
|
1354 |
|
1355 'fields' => array( |
|
1356 |
|
1357 array( |
|
1358 |
|
1359 'id' => 'enable_colorization', |
|
1360 |
|
1361 'type' => 'button_set', |
|
1362 |
|
1363 'options' => array('1' => 'Yes', '0' => 'No'), |
|
1364 |
|
1365 'title' => 'Enable custom colorization & font changes?', |
|
1366 |
|
1367 'sub_desc' => '<strong>Please note that if you enable if, all the bottom settings will be used. For just some changes, use style.css.</strong>', |
|
1368 |
|
1369 'std' => 0 |
|
1370 |
|
1371 ), |
|
1372 |
|
1373 array( |
|
1374 |
|
1375 'id' => 'bg_image', |
|
1376 |
|
1377 'type' => 'upload', |
|
1378 |
|
1379 'title' => 'Background image', |
|
1380 |
|
1381 'sub_desc' => 'Use this only if you want a custom background image, different than the default one.' |
|
1382 |
|
1383 ), |
|
1384 |
|
1385 array( |
|
1386 |
|
1387 'id' => 'bg_color', |
|
1388 |
|
1389 'type' => 'color', |
|
1390 |
|
1391 'title' => 'Background color', |
|
1392 |
|
1393 'sub_desc' => 'This will override any background image that was used previously and use just a color.' |
|
1394 |
|
1395 ), |
|
1396 |
|
1397 array( |
|
1398 |
|
1399 'id' => 'body_font', |
|
1400 |
|
1401 'title' => 'Font for the page titles:', |
|
1402 |
|
1403 'type' => 'select', |
|
1404 |
|
1405 'options' => $google_fonts, |
|
1406 |
|
1407 'sub_desc' => 'The google font to be used on the body text', |
|
1408 |
|
1409 'std' => 'Source+Sans+Pro' |
|
1410 |
|
1411 ), |
|
1412 |
|
1413 array( |
|
1414 |
|
1415 'id' => 'body_size', |
|
1416 |
|
1417 'type' => 'text', |
|
1418 |
|
1419 'title' => 'The default font size for the body text', |
|
1420 |
|
1421 'sub_desc' => 'This is the default font-size used on the body text(use just numbers, without px)', |
|
1422 |
|
1423 'std' => '16', |
|
1424 |
|
1425 'validate' => 'numeric' |
|
1426 |
|
1427 ), |
|
1428 |
|
1429 array( |
|
1430 |
|
1431 'id' => 'body_color_white', |
|
1432 |
|
1433 'title' => 'Color for the body text with white background:', |
|
1434 |
|
1435 'type' => 'color', |
|
1436 |
|
1437 'sub_desc' => 'The color used on the body text when the white background is used', |
|
1438 |
|
1439 'std' => '#3D3D3D' |
|
1440 |
|
1441 ), |
|
1442 |
|
1443 array( |
|
1444 |
|
1445 'id' => 'body_color_dark', |
|
1446 |
|
1447 'title' => 'Color for the body text with the dark background:', |
|
1448 |
|
1449 'type' => 'color', |
|
1450 |
|
1451 'sub_desc' => 'The color used on the body text when the dark background is used', |
|
1452 |
|
1453 'std' => '#F9F9F9' |
|
1454 |
|
1455 ), |
|
1456 |
|
1457 array( |
|
1458 |
|
1459 'id' => 'top_headertext_size', |
|
1460 |
|
1461 'type' => 'text', |
|
1462 |
|
1463 'title' => 'Font-size for the top header text', |
|
1464 |
|
1465 'sub_desc' => 'This is the font-size of the first big text on the homepage. Use just numeric values without px', |
|
1466 |
|
1467 'std' => '120', |
|
1468 |
|
1469 'validate' => 'numeric' |
|
1470 |
|
1471 ), |
|
1472 |
|
1473 array( |
|
1474 |
|
1475 'id' => 'top_headertext_color', |
|
1476 |
|
1477 'type' => 'color', |
|
1478 |
|
1479 'title' => 'Color for the top header text', |
|
1480 |
|
1481 'sub_desc' => 'This is the color of the first big text on the homepage.', |
|
1482 |
|
1483 'std' => '#FFFFFF' |
|
1484 |
|
1485 ), |
|
1486 |
|
1487 array( |
|
1488 |
|
1489 'id' => 'top_headertext_font', |
|
1490 |
|
1491 'title' => 'Font for the top header text:', |
|
1492 |
|
1493 'type' => 'select', |
|
1494 |
|
1495 'options' => $google_fonts, |
|
1496 |
|
1497 'sub_desc' => 'The google font to be used on the top header text', |
|
1498 |
|
1499 'std' => 'Oswald' |
|
1500 |
|
1501 ), |
|
1502 |
|
1503 array( |
|
1504 |
|
1505 'id' => 'top_smalltext_size', |
|
1506 |
|
1507 'type' => 'text', |
|
1508 |
|
1509 'title' => 'Font-size for the small header text', |
|
1510 |
|
1511 'sub_desc' => 'Font-size for the small text under the big one, on the first page. Use just numeric values without px', |
|
1512 |
|
1513 'std' => '90', |
|
1514 |
|
1515 'validate' => 'numeric' |
|
1516 |
|
1517 ), |
|
1518 |
|
1519 array( |
|
1520 |
|
1521 'id' => 'top_smalltext_color', |
|
1522 |
|
1523 'type' => 'color', |
|
1524 |
|
1525 'title' => 'Color for the small header text', |
|
1526 |
|
1527 'sub_desc' => 'This is the color of the small text in the header, under the big heading.', |
|
1528 |
|
1529 'std' => '#FFFFFF', |
|
1530 |
|
1531 ), |
|
1532 |
|
1533 array( |
|
1534 |
|
1535 'id' => 'top_smalltext_font', |
|
1536 |
|
1537 'title' => 'Font for the small header text:', |
|
1538 |
|
1539 'type' => 'select', |
|
1540 |
|
1541 'options' => $google_fonts, |
|
1542 |
|
1543 'sub_desc' => 'The google font to be used on the small header text', |
|
1544 |
|
1545 'std' => 'Oswald' |
|
1546 |
|
1547 ), |
|
1548 |
|
1549 array( |
|
1550 |
|
1551 'id' => 'top_smallertext_size', |
|
1552 |
|
1553 'type' => 'text', |
|
1554 |
|
1555 'title' => 'Font-size for the smaller header text', |
|
1556 |
|
1557 'sub_desc' => 'Font-size for the smaller text under the small text above, on the first page. Use just numeric values without px', |
|
1558 |
|
1559 'std' => '40', |
|
1560 |
|
1561 'validate' => 'numeric' |
|
1562 |
|
1563 ), |
|
1564 |
|
1565 array( |
|
1566 |
|
1567 'id' => 'top_smallertext_color', |
|
1568 |
|
1569 'type' => 'color', |
|
1570 |
|
1571 'title' => 'Color for the smaller header text', |
|
1572 |
|
1573 'sub_desc' => 'This is the color of the smaller text in the header, under the small text above.', |
|
1574 |
|
1575 'std' => '#FFFFFF', |
|
1576 |
|
1577 ), |
|
1578 |
|
1579 array( |
|
1580 |
|
1581 'id' => 'top_smallertext_font', |
|
1582 |
|
1583 'title' => 'Font for the small header text:', |
|
1584 |
|
1585 'type' => 'select', |
|
1586 |
|
1587 'options' => $google_fonts, |
|
1588 |
|
1589 'sub_desc' => 'The google font to be used on the small header text', |
|
1590 |
|
1591 'std' => 'Oswald' |
|
1592 |
|
1593 ), |
|
1594 |
|
1595 array( |
|
1596 |
|
1597 'id' => 'nav_color', |
|
1598 |
|
1599 'type' => 'color', |
|
1600 |
|
1601 'title' => 'The color for the navigation menu', |
|
1602 |
|
1603 'sub_desc' => 'The color used on the navigation menu', |
|
1604 |
|
1605 'std' => '#515151' |
|
1606 |
|
1607 ), |
|
1608 |
|
1609 array( |
|
1610 |
|
1611 'id' => 'nav_hovercolor', |
|
1612 |
|
1613 'type' => 'color', |
|
1614 |
|
1615 'title' => 'The hover color for the navigation menu', |
|
1616 |
|
1617 'sub_desc' => 'The hover color used on the navigation menu', |
|
1618 |
|
1619 'std' => '#000000' |
|
1620 |
|
1621 ), |
|
1622 |
|
1623 array( |
|
1624 |
|
1625 'id' => 'nav_size', |
|
1626 |
|
1627 'type' => 'text', |
|
1628 |
|
1629 'title' => 'The font-size for the navigation menu items', |
|
1630 |
|
1631 'sub_desc' => 'The font-size used on the navigation menu items', |
|
1632 |
|
1633 'std' => '16' |
|
1634 |
|
1635 ), |
|
1636 |
|
1637 array( |
|
1638 |
|
1639 'id' => 'nav_font', |
|
1640 |
|
1641 'title' => 'Font for the navigation menu items:', |
|
1642 |
|
1643 'type' => 'select', |
|
1644 |
|
1645 'options' => $google_fonts, |
|
1646 |
|
1647 'sub_desc' => 'The google font to be used on the navigation menu items', |
|
1648 |
|
1649 'std' => 'Source+Sans+Pro' |
|
1650 |
|
1651 ), |
|
1652 |
|
1653 array( |
|
1654 |
|
1655 'id' => 'pagetitle_font', |
|
1656 |
|
1657 'title' => 'Font for the page titles:', |
|
1658 |
|
1659 'type' => 'select', |
|
1660 |
|
1661 'options' => $google_fonts, |
|
1662 |
|
1663 'sub_desc' => 'The google font to be used on paragraphs', |
|
1664 |
|
1665 'std' => 'Oswald' |
|
1666 |
|
1667 ), |
|
1668 |
|
1669 array( |
|
1670 |
|
1671 'id' => 'pagetitle_size', |
|
1672 |
|
1673 'type' => 'text', |
|
1674 |
|
1675 'title' => 'The default font size for the page titles', |
|
1676 |
|
1677 'sub_desc' => 'This is the default font-size used on the page titles(use just numbers, without px)', |
|
1678 |
|
1679 'std' => '60', |
|
1680 |
|
1681 'validate' => 'numeric' |
|
1682 |
|
1683 ), |
|
1684 |
|
1685 array( |
|
1686 |
|
1687 'id' => 'pagetitle_color', |
|
1688 |
|
1689 'title' => 'Color for the page titles:', |
|
1690 |
|
1691 'type' => 'color', |
|
1692 |
|
1693 'sub_desc' => 'The color used on the page titles', |
|
1694 |
|
1695 'std' => '#434343' |
|
1696 |
|
1697 ), |
|
1698 |
|
1699 array( |
|
1700 |
|
1701 'id' => 'subheader_font', |
|
1702 |
|
1703 'title' => 'Font for the subheader shortcode:', |
|
1704 |
|
1705 'type' => 'select', |
|
1706 |
|
1707 'options' => $google_fonts, |
|
1708 |
|
1709 'sub_desc' => 'The google font to be used on the subheader shortcode', |
|
1710 |
|
1711 'std' => 'Source+Sans+Pro' |
|
1712 |
|
1713 ), |
|
1714 |
|
1715 array( |
|
1716 |
|
1717 'id' => 'subheader_size', |
|
1718 |
|
1719 'type' => 'text', |
|
1720 |
|
1721 'title' => 'The default font size for the subheader shortcode', |
|
1722 |
|
1723 'sub_desc' => 'This is the default font-size used on the subheader shortcode(use just numbers, without px)', |
|
1724 |
|
1725 'std' => '22', |
|
1726 |
|
1727 'validate' => 'numeric' |
|
1728 |
|
1729 ), |
|
1730 |
|
1731 array( |
|
1732 |
|
1733 'id' => 'subheader_color', |
|
1734 |
|
1735 'title' => 'Color for the subheader shortcode:', |
|
1736 |
|
1737 'type' => 'color', |
|
1738 |
|
1739 'sub_desc' => 'The color used on the subheader shortcode', |
|
1740 |
|
1741 'std' => '#515151' |
|
1742 |
|
1743 ), |
|
1744 |
|
1745 array( |
|
1746 |
|
1747 'id' => 'h3_size', |
|
1748 |
|
1749 'type' => 'text', |
|
1750 |
|
1751 'title' => 'The default font size for the h3 heading', |
|
1752 |
|
1753 'sub_desc' => 'This is the default font-size used on the h3 headings(use just numbers, without px)', |
|
1754 |
|
1755 'std' => '30', |
|
1756 |
|
1757 'validate' => 'numeric' |
|
1758 |
|
1759 ), |
|
1760 |
|
1761 array( |
|
1762 |
|
1763 'id' => 'h3_font', |
|
1764 |
|
1765 'title' => 'The default font for the h3 heading:', |
|
1766 |
|
1767 'type' => 'select', |
|
1768 |
|
1769 'options' => $google_fonts, |
|
1770 |
|
1771 'sub_desc' => 'The google font to be used on the h3 headings', |
|
1772 |
|
1773 'std' => 'Oswald' |
|
1774 |
|
1775 ), |
|
1776 |
|
1777 array( |
|
1778 |
|
1779 'id' => 'h3_color', |
|
1780 |
|
1781 'type' => 'color', |
|
1782 |
|
1783 'title' => 'The default color for the h3 heading', |
|
1784 |
|
1785 'sub_desc' => 'This is the default color used on the h3 headings', |
|
1786 |
|
1787 'std' => '#434343', |
|
1788 |
|
1789 ), |
|
1790 |
|
1791 array( |
|
1792 |
|
1793 'id' => 'h4_size', |
|
1794 |
|
1795 'type' => 'text', |
|
1796 |
|
1797 'title' => 'The default font size for the h4 heading', |
|
1798 |
|
1799 'sub_desc' => 'This is the default font-size used on the h4 headings(use just numbers, without px)', |
|
1800 |
|
1801 'std' => '18', |
|
1802 |
|
1803 'validate' => 'numeric' |
|
1804 |
|
1805 ), |
|
1806 |
|
1807 array( |
|
1808 |
|
1809 'id' => 'h4_font', |
|
1810 |
|
1811 'title' => 'The default font for the h4 heading:', |
|
1812 |
|
1813 'type' => 'select', |
|
1814 |
|
1815 'options' => $google_fonts, |
|
1816 |
|
1817 'sub_desc' => 'The google font to be used on the h4 headings', |
|
1818 |
|
1819 'std' => 'Source+Sans+Pro' |
|
1820 |
|
1821 ), |
|
1822 |
|
1823 array( |
|
1824 |
|
1825 'id' => 'h4_color', |
|
1826 |
|
1827 'type' => 'color', |
|
1828 |
|
1829 'title' => 'The default color for the h4 heading', |
|
1830 |
|
1831 'sub_desc' => 'This is the default color used on the h4 headings', |
|
1832 |
|
1833 'std' => '#434343', |
|
1834 |
|
1835 ), |
|
1836 |
|
1837 array( |
|
1838 |
|
1839 'id' => 'separator_size', |
|
1840 |
|
1841 'type' => 'text', |
|
1842 |
|
1843 'title' => 'The default font size for the separators', |
|
1844 |
|
1845 'sub_desc' => 'This is the default font-size used on the separators(use just numbers, without px)', |
|
1846 |
|
1847 'std' => '30', |
|
1848 |
|
1849 'validate' => 'numeric' |
|
1850 |
|
1851 ), |
|
1852 |
|
1853 array( |
|
1854 |
|
1855 'id' => 'separator_font', |
|
1856 |
|
1857 'title' => 'The default font for the separators:', |
|
1858 |
|
1859 'type' => 'select', |
|
1860 |
|
1861 'options' => $google_fonts, |
|
1862 |
|
1863 'sub_desc' => 'The google font to be used on the separators', |
|
1864 |
|
1865 'std' => 'Source+Sans+Pro' |
|
1866 |
|
1867 ), |
|
1868 |
|
1869 array( |
|
1870 |
|
1871 'id' => 'separator_color', |
|
1872 |
|
1873 'title' => 'The color for the separators', |
|
1874 |
|
1875 'type' => 'color', |
|
1876 |
|
1877 'std' => '#ffffff' |
|
1878 |
|
1879 ), |
|
1880 |
|
1881 array( |
|
1882 |
|
1883 'id' => 'footer_size', |
|
1884 |
|
1885 'type' => 'text', |
|
1886 |
|
1887 'title' => 'The default font size for the footer text', |
|
1888 |
|
1889 'sub_desc' => 'This is the default font-size used on the footer text(use just numbers, without px)', |
|
1890 |
|
1891 'std' => '14', |
|
1892 |
|
1893 'validate' => 'numeric' |
|
1894 |
|
1895 ), |
|
1896 |
|
1897 array( |
|
1898 |
|
1899 'id' => 'footer_font', |
|
1900 |
|
1901 'title' => 'The default font for the footer text:', |
|
1902 |
|
1903 'type' => 'select', |
|
1904 |
|
1905 'options' => $google_fonts, |
|
1906 |
|
1907 'sub_desc' => 'The google font to be used on the footer text', |
|
1908 |
|
1909 'std' => 'Source+Sans+Pro' |
|
1910 |
|
1911 ), |
|
1912 |
|
1913 array( |
|
1914 |
|
1915 'id' => 'footer_color', |
|
1916 |
|
1917 'title' => 'The default color for the footer text:', |
|
1918 |
|
1919 'type' => 'color', |
|
1920 |
|
1921 'sub_desc' => 'The color of the footer text', |
|
1922 |
|
1923 'std' => '#858585' |
|
1924 |
|
1925 ), |
|
1926 |
|
1927 ) |
|
1928 |
|
1929 ); |
|
1930 |
|
1931 |
|
1932 |
|
1933 $tabs = array(); |
|
1934 |
|
1935 |
|
1936 |
|
1937 if (function_exists('wp_get_theme')){ |
|
1938 |
|
1939 $theme_data = wp_get_theme(); |
|
1940 |
|
1941 $theme_uri = $theme_data->get('ThemeURI'); |
|
1942 |
|
1943 $description = $theme_data->get('Description'); |
|
1944 |
|
1945 $author = $theme_data->get('Author'); |
|
1946 |
|
1947 $version = $theme_data->get('Version'); |
|
1948 |
|
1949 $tags = $theme_data->get('Tags'); |
|
1950 |
|
1951 }else{ |
|
1952 |
|
1953 $theme_data = wp_get_theme(); |
|
1954 |
|
1955 $theme_uri = $theme_data['ThemeURI']; |
|
1956 |
|
1957 $description = $theme_data['Description']; |
|
1958 |
|
1959 $author = $theme_data['Author']; |
|
1960 |
|
1961 $version = $theme_data['Version']; |
|
1962 |
|
1963 $tags = $theme_data['Tags']; |
|
1964 |
|
1965 } |
|
1966 |
|
1967 |
|
1968 |
|
1969 $theme_info = '<div class="nhp-opts-section-desc">'; |
|
1970 |
|
1971 $theme_info .= '<p class="nhp-opts-theme-data description theme-uri">'.__('<strong>Theme URL:</strong> ', 'nhp-opts').'<a href="'.$theme_uri.'" target="_blank">'.$theme_uri.'</a></p>'; |
|
1972 |
|
1973 $theme_info .= '<p class="nhp-opts-theme-data description theme-author">'.__('<strong>Author:</strong> ', 'nhp-opts').$author.'</p>'; |
|
1974 |
|
1975 $theme_info .= '<p class="nhp-opts-theme-data description theme-version">'.__('<strong>Version:</strong> ', 'nhp-opts').$version.'</p>'; |
|
1976 |
|
1977 $theme_info .= '<p class="nhp-opts-theme-data description theme-description">'.$description.'</p>'; |
|
1978 |
|
1979 $theme_info .= '<p class="nhp-opts-theme-data description theme-tags">'.__('<strong>Tags:</strong> ', 'nhp-opts').implode(', ', $tags).'</p>'; |
|
1980 |
|
1981 $theme_info .= '</div>'; |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 $tabs['theme_info'] = array( |
|
1990 |
|
1991 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_195_circle_info.png', |
|
1992 |
|
1993 'title' => __('Theme Information', 'nhp-opts'), |
|
1994 |
|
1995 'content' => $theme_info |
|
1996 |
|
1997 ); |
|
1998 |
|
1999 |
|
2000 |
|
2001 if(file_exists(trailingslashit(get_stylesheet_directory()).'README.html')){ |
|
2002 |
|
2003 $tabs['theme_docs'] = array( |
|
2004 |
|
2005 'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_071_book.png', |
|
2006 |
|
2007 'title' => __('Documentation', 'nhp-opts'), |
|
2008 |
|
2009 'content' => nl2br(file_get_contents(trailingslashit(get_stylesheet_directory()).'README.html')) |
|
2010 |
|
2011 ); |
|
2012 |
|
2013 }//if |
|
2014 |
|
2015 |
|
2016 |
|
2017 global $NHP_Options; |
|
2018 |
|
2019 $NHP_Options = new NHP_Options($sections, $args, $tabs); |
|
2020 |
|
2021 |
|
2022 |
|
2023 }//function |
|
2024 |
|
2025 add_action('init', 'setup_framework_options', 0); |
|
2026 |
|
2027 |
|
2028 |
|
2029 /* |
|
2030 |
|
2031 * |
|
2032 |
|
2033 * Custom function for the callback referenced above |
|
2034 |
|
2035 * |
|
2036 |
|
2037 */ |
|
2038 |
|
2039 function my_custom_field($field, $value){ |
|
2040 |
|
2041 print_r($field); |
|
2042 |
|
2043 print_r($value); |
|
2044 |
|
2045 |
|
2046 |
|
2047 }//function |
|
2048 |
|
2049 |
|
2050 |
|
2051 /* |
|
2052 |
|
2053 * |
|
2054 |
|
2055 * Custom function for the callback validation referenced above |
|
2056 |
|
2057 * |
|
2058 |
|
2059 */ |
|
2060 |
|
2061 function validate_callback_function($field, $value, $existing_value){ |
|
2062 |
|
2063 |
|
2064 |
|
2065 $error = false; |
|
2066 |
|
2067 $value = 'just testing'; |
|
2068 |
|
2069 /* |
|
2070 |
|
2071 do your validation |
|
2072 |
|
2073 |
|
2074 |
|
2075 if(something){ |
|
2076 |
|
2077 $value = $value; |
|
2078 |
|
2079 }elseif(somthing else){ |
|
2080 |
|
2081 $error = true; |
|
2082 |
|
2083 $value = $existing_value; |
|
2084 |
|
2085 $field['msg'] = 'your custom error message'; |
|
2086 |
|
2087 } |
|
2088 |
|
2089 */ |
|
2090 |
|
2091 |
|
2092 |
|
2093 $return['value'] = $value; |
|
2094 |
|
2095 if($error == true){ |
|
2096 |
|
2097 $return['error'] = $field; |
|
2098 |
|
2099 } |
|
2100 |
|
2101 return $return; |
|
2102 |
|
2103 |
|
2104 |
|
2105 }//function |
|
2106 |
|
2107 ?> |
|