-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaterialize.php
More file actions
2565 lines (2346 loc) · 137 KB
/
Copy pathmaterialize.php
File metadata and controls
2565 lines (2346 loc) · 137 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
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*
Plugin Name: Materialize
Plugin URI: http://mtaandao.co.ke/plugins/materialize
Description: A mobile menu for WordPress. Customize under Settings > Materialize. Customize colors under Appearance > Customize > Materialize Colors.
Version: 2.6
Author: Swahilipot Hub Devs
License: GPL2
*/
//
// CREATE THE SETTINGS PAGE (for WordPress backend, Settings > Materialize)
//
/* create "Settings" link on plugins page */
function drawer_materialize_settings_link($links) {
$settings_link = '<a href="options-general.php?page=materialize-drawer/materialize.php">Settings</a>';
array_unshift($links, $settings_link);
return $links;
}
$plugin = plugin_basename(__FILE__);
add_filter("plugin_action_links_$plugin", 'drawer_materialize_settings_link' );
/* create the "Settings > Materialize" menu item */
function drawer_materialize_admin_menu() {
add_submenu_page('options-general.php', 'Materialize Settings', 'Materialize', 'administrator', __FILE__, 'drawer_materialize_page');
}
/* create the actual settings page */
function drawer_materialize_page() {
if ( isset ($_POST['update_drawer_materialize']) == 'true' ) { drawer_materialize_update(); }
?>
<div class="wrap">
<br>
<h2>Materialize</h2>
<strong>Psst!</strong> Materialize's color options can be changed under <strong>Appearance > Customize > Materialize Colors</strong>
<br>
<br>
<strong>Jump to:</strong>
<a href="#alignment">Alignment</a> |
<a href="#animations">Animations</a> |
<a href="#menu-button-logo-search">Menu button, logo, search</a> |
<a href="#heading">Heading</a> |
<a href="#subheading">Subheading</a> |
<a href="#image">Image</a> |
<a href="#menu-submenu">Menu & submenu</a> |
<a href="#menu-description">Menu description</a> |
<a href="#menu-icons">Menu icons</a> |
<a href="#widgets">Widgets</a> |
<a href="#background">Background</a> |
<a href="#hide-at-certain-width-resolution">Hide at certain width/resolution</a>
<form method="POST" action="">
<input type="hidden" name="update_drawer_materialize" value="true" />
<br><hr><br>
<!-- BEGIN ALIGNMENT -->
<div id="alignment"></div>
<br>
<br>
<h2>Alignment</h2>
<table class="form-table">
<!-- BEGIN HORIZONTAL ALIGNMENT -->
<tr valign="top">
<th scope="row">Horizontal alignment:</th>
<td>
<?php $materialize_horizontal_alignment = get_option('drawer_materialize_horizontal_alignment'); ?>
<label><input value="materializealignleft" type="radio" name="materialize_horizontal_alignment" <?php if ($materialize_horizontal_alignment=='materializealignleft') { echo 'checked'; } ?>> Left</label><br>
<label><input value="materializealigncenter" type="radio" name="materialize_horizontal_alignment" <?php if ($materialize_horizontal_alignment=='materializealigncenter') { echo 'checked'; } ?>> Center</label><br>
<label><input value="materializealignright" type="radio" name="materialize_horizontal_alignment" <?php if ($materialize_horizontal_alignment=='materializealignright') { echo 'checked'; } ?>> Right</label><br>
</td>
</tr>
<!-- END HORIZONTAL ALIGNMENT -->
<!-- BEGIN VERTICAL ALIGNMENT -->
<tr valign="top">
<th scope="row">Vertical alignment:</th>
<td>
<?php $materialize_vertical_alignment = get_option('drawer_materialize_vertical_alignment'); ?>
<label><input value="materializealigntop" type="radio" name="materialize_vertical_alignment" <?php if ($materialize_vertical_alignment=='materializealigntop') { echo 'checked'; } ?>> Top</label><br>
<label><input value="materializealignmiddle" type="radio" name="materialize_vertical_alignment" <?php if ($materialize_vertical_alignment=='materializealignmiddle') { echo 'checked'; } ?>> Middle</label><br>
<label><input value="materializealignbottom" type="radio" name="materialize_vertical_alignment" <?php if ($materialize_vertical_alignment=='materializealignbottom') { echo 'checked'; } ?>> Bottom</label><br>
</td>
</tr>
<!-- END VERTICAL ALIGNMENT -->
</table>
<!-- END ALIGNMENT -->
<br><hr><br>
<!-- BEGIN ANIMATIONS -->
<div id="animations"></div>
<br>
<br>
<h2>Animations</h2>
<table class="form-table">
<!-- BEGIN BUTTON ANIMATION -->
<tr valign="top">
<th scope="row">Menu button animation:</th>
<td>
<?php $materialize_button_animation = get_option('drawer_materialize_button_animation'); ?>
<label><input value="materializenoanimation" type="radio" name="materialize_button_animation" <?php if ($materialize_button_animation=='materializenoanimation') { echo 'checked'; } ?>> No animation</label><br>
<label><input value="materializeminusanimation" type="radio" name="materialize_button_animation" <?php if ($materialize_button_animation=='materializeminusanimation') { echo 'checked'; } ?>> Minus sign</label><br>
<label><input value="materializexanimation" type="radio" name="materialize_button_animation" <?php if ($materialize_button_animation=='materializexanimation') { echo 'checked'; } ?>> X sign</label><br>
</td>
</tr>
<!-- END BUTTON ANIMATION -->
<!-- BEGIN MENU BUTTON SPEED -->
<tr valign="top">
<th scope="row">Menu button animation speed:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_button_speed" id="materialize_menu_button_speed" value="<?php echo get_option('drawer_materialize_menu_button_speed'); ?>"/> seconds
<br> Enter custom menu button animation speed (in seconds). Example: 0.5. If left empty, defaults to 0.25
</td>
</tr>
<!-- END MENU BUTTON SPEED -->
<!-- BEGIN BACKGOUND ANIMATION -->
<tr valign="top">
<th scope="row">Fade/slide-in direction:</th>
<td>
<?php $materialize_menu_animation = get_option('drawer_materialize_menu_animation'); ?>
<label><input value="materializetop" type="radio" name="materialize_menu_animation" <?php if ($materialize_menu_animation=='materializetop') { echo 'checked'; } ?>> Top</label><br>
<label><input value="materializeleft" type="radio" name="materialize_menu_animation" <?php if ($materialize_menu_animation=='materializeleft') { echo 'checked'; } ?>> Left</label><br>
<label><input value="materializeright" type="radio" name="materialize_menu_animation" <?php if ($materialize_menu_animation=='materializeright') { echo 'checked'; } ?>> Right</label><br>
<label><input value="materializebottom" type="radio" name="materialize_menu_animation" <?php if ($materialize_menu_animation=='materializebottom') { echo 'checked'; } ?>> Bottom</label><br>
<label><input value="materializefade" type="radio" name="materialize_menu_animation" <?php if ($materialize_menu_animation=='materializefade') { echo 'checked'; } ?>> Fade</label><br>
</td>
</tr>
<!-- END BACKGOUND ANIMATION -->
</table>
<!-- END ANIMATIONS -->
<br><hr><br>
<!-- BEGIN POSITIONING OPTIONS -->
<div id="menu-button-logo-search"></div>
<br>
<br>
<h2>Menu button, logo, search</h2>
<table class="form-table">
<!-- BEGIN MENU BUTTON STYLE -->
<tr valign="top">
<th scope="row">Menu button style:</th>
<td>
<?php $materialize_menu_button_style = get_option('drawer_materialize_menu_button_style'); ?>
<label><input value="materializefourlines" type="radio" name="materialize_menu_button_style" <?php if ($materialize_menu_button_style=='materializefourlines') { echo 'checked'; } ?>> 4 lines (default)</label><br>
<label><input value="materializefourlinesalt" type="radio" name="materialize_menu_button_style" <?php if ($materialize_menu_button_style=='materializefourlinesalt') { echo 'checked'; } ?>> 4 lines (alternate)</label><br>
<label><input value="materializethreelines" type="radio" name="materialize_menu_button_style" <?php if ($materialize_menu_button_style=='materializethreelines') { echo 'checked'; } ?>> 3 lines (traditional hamburger menu)</label><br>
<label><input value="materializethreelinesalt" type="radio" name="materialize_menu_button_style" <?php if ($materialize_menu_button_style=='materializethreelinesalt') { echo 'checked'; } ?>> 3 lines (alternate hamburger menu)</label><br>
<label><input value="materializestatic" type="radio" name="materialize_menu_button_style" <?php if ($materialize_menu_button_style=='materializestatic') { echo 'checked'; } ?>> Static, 3 lines (may be beneficial if your site has a lot of visitors from old devices)</label><br>
</td>
</tr>
<!-- END MENU BUTTON STYLE -->
<!-- BEGIN ABSOLUTE POSITIONING -->
<tr valign="top">
<th scope="row">Absolute/fixed positioning:</th>
<td>
<label><input type="checkbox" name="materialize_absolute_position" id="materialize_absolute_position" <?php echo get_option('drawer_materialize_absolute_position'); ?> /> Absolute positioning (menu, search buttons and logo leave the screen when scrolled).
<br>If unticked, they'll have fixed positioning and will remain at the top at all times.</label><br>
</td>
</tr>
<!-- END ABSOLUTE POSITIONING -->
<!-- BEGIN POSITIONING -->
<tr valign="top">
<th scope="row">Positioning:</th>
<td>
<?php $materialize_heading_positioning = get_option('drawer_materialize_heading_positioning'); ?>
<label><input value="materializeheadingone" type="radio" name="materialize_heading_positioning" <?php if ($materialize_heading_positioning=='materializeheadingone') { echo 'checked'; } ?>> Menu | Search -------------- Logo</label><br>
<label><input value="materializeheadingtwo" type="radio" name="materialize_heading_positioning" <?php if ($materialize_heading_positioning=='materializeheadingtwo') { echo 'checked'; } ?>> Logo -------------- Search | Menu</label><br>
<label><input value="materializeheadingthree" type="radio" name="materialize_heading_positioning" <?php if ($materialize_heading_positioning=='materializeheadingthree') { echo 'checked'; } ?>> Menu ------- Logo ------- Search</label><br>
<label><input value="materializeheadingfour" type="radio" name="materialize_heading_positioning" <?php if ($materialize_heading_positioning=='materializeheadingfour') { echo 'checked'; } ?>> Search ------- Logo ------- Menu</label><br>
</td>
</tr>
<!-- END POSITIONING -->
<!-- BEGIN MENU BUTTON OPACITY -->
<tr valign="top">
<th scope="row">Menu button opacity:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_button_opacity" id="materialize_menu_button_opacity" value="<?php echo get_option('drawer_materialize_menu_button_opacity'); ?>"/>
<br> Enter custom menu button opacity. From 0-1 (example: 0.5) If left empty, defaults to 1
</td>
</tr>
<!-- END MENU BUTTON OPACITY -->
<!-- BEGIN HIDE LOGO -->
<tr valign="top">
<th scope="row">Hide logo?:</th>
<td>
<label><input type="checkbox" name="materialize_hide_logo" id="materialize_hide_logo" <?php echo get_option('drawer_materialize_hide_logo'); ?> /> Don't show logo.
<br>If unchecked, logo will be shown (To use an image logo, head to Appearance > Customize > Materialize Logo).</label><br>
</td>
</tr>
<!-- END HIDE LOGO -->
<!-- BEGIN HIDE SEARCH + SEARCH DIVIDER -->
<tr valign="top">
<th scope="row">Hide search?:</th>
<td>
<label><input type="checkbox" name="materialize_hide_search" id="materialize_hide_search" <?php echo get_option('drawer_materialize_hide_search'); ?> /> Don't show search.</label><br>
</td>
</tr>
<!-- END HIDE SEARCH + SEARCH DIVIDER -->
<!-- BEGIN HIDE SEARCH DIVIDER ONLY -->
<tr valign="top">
<th scope="row">Hide search button divider?:</th>
<td>
<label><input type="checkbox" name="materialize_hide_search_divider" id="materialize_hide_search_divider" <?php echo get_option('drawer_materialize_hide_search_divider'); ?> /> Don't show the search button divider.</label><br>
</td>
</tr>
<!-- END HIDE SEARCH DIVIDER ONLY -->
<!-- BEGIN CHANGE SEARCH TEXT -->
<tr valign="top">
<th scope="row">Search text:</th>
<td>
<input style="width:100%;height:35px;" type="text" name="materialize_search_text" id="materialize_search_text" value="<?php echo stripslashes(get_option('drawer_materialize_search_text')); ?>"/>
<br> Enter custom search form default text. If left empty, defaults to "type search term..."
</td>
</tr>
<!-- END CHANGE SEARCH TEXT -->
<!-- BEGIN SHOW HEADER -->
<tr valign="top">
<th scope="row">Show header background?:</th>
<td>
<label><input type="checkbox" name="materialize_show_header" id="materialize_show_header" <?php echo get_option('drawer_materialize_show_header'); ?> /> Show header background behind menu/search buttons and the logo.</label><br>
</td>
</tr>
<!-- END SHOW HEADER -->
<!-- BEGIN SHOW HEADER SHADOW -->
<tr valign="top">
<th scope="row">Show shadow on header background?:</th>
<td>
<label><input type="checkbox" name="materialize_show_header_shadow" id="materialize_show_header_shadow" <?php echo get_option('drawer_materialize_show_header_shadow'); ?> /> Show shadow behind header background.</label><br>
</td>
</tr>
<!-- END SHOW HEADER SHADOW -->
<!-- BEGIN HEADER BACKGROUND SHADOW OPACITY -->
<tr valign="top">
<th scope="row">Header background shadow opacity:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_header_background_shadow_opacity" id="materialize_header_background_shadow_opacity" value="<?php echo get_option('drawer_materialize_header_background_shadow_opacity'); ?>"/>
<br> Enter custom header background shadow opacity (if header background and shadow enabled). From 0-1 (example: 0.75) If left empty, defaults to 0.4
</td>
</tr>
<!-- END HEADER BACKGROUND SHADOW OPACITY -->
<!-- BEGIN SHOW HEADER + SEARCH ABOVE FULL-SCREEN MENU -->
<tr valign="top">
<th scope="row">Show header and search when menu opened?:</th>
<td>
<label><input type="checkbox" name="materialize_show_header_search_above" id="materialize_show_header_search_above" <?php echo get_option('drawer_materialize_show_header_search_above'); ?> /> Show header (if activated above), logo and search button when menu is open. If left unchecked, these elements will appear behind full-screen menu.</label><br>
</td>
</tr>
<!-- END SHOW HEADER + SEARCH ABOVE FULL-SCREEN MENU -->
<!-- BEGIN HEADER BACKGROUND OPACITY -->
<tr valign="top">
<th scope="row">Header background opacity:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_header_background_opacity" id="materialize_header_background_opacity" value="<?php echo get_option('drawer_materialize_header_background_opacity'); ?>"/>
<br> Enter custom header background opacity (if header background enabled). From 0-1 (example: 0.5) If left empty, defaults to 1
</td>
</tr>
<!-- END HEADER BACKGROUND OPACITY -->
<!-- BEGIN PUSH DOWN SITE -->
<tr valign="top">
<th scope="row">Push down site?:</th>
<td>
<label><input type="checkbox" name="materialize_site_top" id="materialize_site_top" <?php echo get_option('drawer_materialize_site_top'); ?> /> Push down your site by height of Materialize menu.
<br>If unchecked, the Materialize menu button, logo and header background will overlap your theme.</label><br>
</td>
</tr>
<!-- END PUSH DOWN SITE -->
</table>
<!-- END POSITIONING OPTIONS -->
<br><hr><br>
<!-- BEGIN HEADING -->
<div id="heading"></div>
<br>
<br>
<h2>Heading</h2>
<table class="form-table">
<!-- BEGIN TOP DISTANCE -->
<tr valign="top">
<th scope="row">Top distance:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_content_top_distance" id="materialize_content_top_distance" value="<?php echo get_option('drawer_materialize_content_top_distance'); ?>"/> px. Enter menu contents' custom top distance. If left empty, defaults to 90px
</td>
</tr>
<!-- END TOP DISTANCE -->
<!-- BEGIN HEADING -->
<tr valign="top">
<th scope="row">Heading text:</th>
<td>
<input style="width:100%;height:35px;" type="text" name="materialize_heading" id="materialize_heading" value="<?php echo stripslashes(get_option('drawer_materialize_heading')); ?>"/>
</td>
</tr>
<!-- END HEADING -->
<!-- BEGIN HEADING LINK -->
<tr valign="top">
<th scope="row">Heading link:</th>
<td>
<input style="width:100%;height:35px;" type="text" name="materialize_heading_link" id="materialize_heading_link" value="<?php echo stripslashes(get_option('drawer_materialize_heading_link')); ?>"/>
</td>
</tr>
<!-- END HEADING LINK -->
<!-- BEGIN HEADING FONT SIZE -->
<tr valign="top">
<th scope="row">Heading font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_heading_font_size" id="materialize_heading_font_size" value="<?php echo get_option('drawer_materialize_heading_font_size'); ?>"/> px. Enter custom font size for heading. If left empty, defaults to 14px
</td>
</tr>
<!-- END HEADING FONT SIZE -->
<!-- BEGIN HEADING LETTER SPACING -->
<tr valign="top">
<th scope="row">Heading letter spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_heading_letter_spacing" id="materialize_heading_letter_spacing" value="<?php echo get_option('drawer_materialize_heading_letter_spacing'); ?>"/> px. Enter custom letter spacing for heading. If left empty, defaults to 0px
</td>
</tr>
<!-- END HEADING LETTER SPACING -->
<!-- BEGIN HEADING LINE HEIGHT -->
<tr valign="top">
<th scope="row">Heading line height:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_heading_line_height" id="materialize_heading_line_height" value="<?php echo get_option('drawer_materialize_heading_line_height'); ?>"/> px. Enter custom line height for heading. Useful if your heading text spans multiple lines.
</td>
</tr>
<!-- END HEADING LINE HEIGHT -->
<!-- BEGIN HEADING FONT -->
<tr valign="top">
<th scope="row">Heading font:</th>
<td>
<?php $materialize_heading_font = get_option('drawer_materialize_heading_font'); ?>
<label><input value="materializeheadingmontserrat" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingmontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializeheadingmontserratbold" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingmontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializeheadingroboto" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializeheadingrobotocondensedregular" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingrobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializeheadingrobotocondensedbold" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingrobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializeheadingbreeserif" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingbreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializeheadingdroidserif" type="radio" name="materialize_heading_font" <?php if ($materialize_heading_font=='materializeheadingdroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
<br><strong>Advanced font feature:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_heading_theme_font" id="materialize_heading_theme_font" value="<?php echo stripslashes(get_option('drawer_materialize_heading_theme_font')); ?>"/> If you know the name of and would like to use one of your theme's fonts, enter it in the textfield above as it appears in the theme's stylesheet (font selection will be automatically overriden)
</td>
</tr>
<!-- END HEADING FONT -->
</table>
<!-- END HEADING -->
<br><hr><br>
<table class="form-table">
<!-- BEGIN DISTANCE BETWEEN HEADING/SUBHEADING -->
<tr valign="top">
<th scope="row">Distance between heading and subheading:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_heading_subheading_distance" id="materialize_heading_subheading_distance" value="<?php echo get_option('drawer_materialize_heading_subheading_distance'); ?>"/> px. Enter custom spacing for heading/subheading.
</td>
</tr>
<!-- END DISTANCE BETWEEN HEADING/SUBHEADING -->
</table>
<br><hr><br>
<!-- BEGIN SUBHEADING -->
<div id="subheading"></div>
<br>
<br>
<h2>Subheading</h2>
<table class="form-table">
<!-- BEGIN SUBHEADING -->
<tr valign="top">
<th scope="row">Subheading text:</th>
<td>
<input style="width:100%;" type="text" name="materialize_subheading" id="materialize_subheading" value="<?php echo stripslashes(get_option('drawer_materialize_subheading')); ?>"/>
</td>
</tr>
<!-- END SUBHEADING -->
<!-- BEGIN SUBHEADING LINK -->
<tr valign="top">
<th scope="row">Subheading link:</th>
<td>
<input style="width:100%;" type="text" name="materialize_subheading_link" id="materialize_subheading_link" value="<?php echo stripslashes(get_option('drawer_materialize_subheading_link')); ?>"/>
</td>
</tr>
<!-- END SUBHEADING LINK -->
<!-- BEGIN SUBHEADING FONT SIZE -->
<tr valign="top">
<th scope="row">Subheading font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_subheading_font_size" id="materialize_subheading_font_size" value="<?php echo get_option('drawer_materialize_subheading_font_size'); ?>"/> px. Enter custom font size for subheading. If left empty, defaults to 10px
</td>
</tr>
<!-- END SUBHEADING FONT SIZE -->
<!-- BEGIN SUBHEADING LETTER SPACING -->
<tr valign="top">
<th scope="row">Subheading letter spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_subheading_letter_spacing" id="materialize_subheading_letter_spacing" value="<?php echo get_option('drawer_materialize_subheading_letter_spacing'); ?>"/> px. Enter custom distance between heading and subheading. If left empty, defaults to 0px
</td>
</tr>
<!-- END SUBHEADING LETTER SPACING -->
<!-- BEGIN SUBHEADING LINE HEIGHT -->
<tr valign="top">
<th scope="row">Subheading line height:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_subheading_line_height" id="materialize_subheading_line_height" value="<?php echo get_option('drawer_materialize_subheading_line_height'); ?>"/> px. Enter custom line height for heading. Useful if your subheading text spans multiple lines.
</td>
</tr>
<!-- END SUBHEADING LINE HEIGHT -->
<!-- BEGIN HEADING FONT -->
<tr valign="top">
<th scope="row">Subheading font:</th>
<td>
<?php $materialize_subheading_font = get_option('drawer_materialize_subheading_font'); ?>
<label><input value="materializesubheadingmontserrat" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingmontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializesubheadingmontserratbold" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingmontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializesubheadingroboto" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializesubheadingrobotocondensedregular" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingrobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializesubheadingrobotocondensedbold" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingrobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializesubheadingbreeserif" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingbreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializesubheadingdroidserif" type="radio" name="materialize_subheading_font" <?php if ($materialize_subheading_font=='materializesubheadingdroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
<br><strong>Advanced font feature:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_subheading_theme_font" id="materialize_subheading_theme_font" value="<?php echo stripslashes(get_option('drawer_materialize_subheading_theme_font')); ?>"/> If you know the name of and would like to use one of your theme's fonts, enter it in the textfield above as it appears in the theme's stylesheet (font selection will be automatically overriden)
</td>
</tr>
<!-- END HEADING FONT -->
</table>
<!-- END SUBHEADING -->
<br><hr><br>
<!-- BEGIN IMAGE -->
<div id="image"></div>
<br>
<br>
<h2>Image</h2>
<table class="form-table">
<!-- BEGIN IMAGE -->
<tr valign="top">
<th scope="row">Image URL:</th>
<td>
<input style="width:100%;" type="text" name="materialize_image" id="materialize_image" value="<?php echo get_option('drawer_materialize_image'); ?>"/>
<br> To display an image between the headings and the menu, enter its URL in the field above.
</td>
</tr>
<!-- END IMAGE -->
<!-- BEGIN IMAGE LINK -->
<tr valign="top">
<th scope="row">Image link:</th>
<td>
<input style="width:100%;height:35px;" type="text" name="materialize_image_link" id="materialize_image_link" value="<?php echo stripslashes(get_option('drawer_materialize_image_link')); ?>"/>
<label><input type="checkbox" name="materialize_image_link_blank" id="materialize_image_link_blank" <?php echo get_option('drawer_materialize_image_link_blank'); ?> /> Open in new window/tab</label>
</td>
</tr>
<!-- END IMAGE LINK -->
</table>
<!-- END IMAGE -->
<br><hr><br>
<!-- BEGIN MENU -->
<div id="menu-submenu"></div>
<br>
<br>
<h2>Menu & submenu</h2>
<table class="form-table">
<!-- BEGIN MAIN MENU OPEN ON FRONT PAGE -->
<tr valign="top">
<th scope="row">Open on front page?:</th>
<td><label><input type="checkbox" name="materialize_main_menu_open" id="materialize_main_menu_open" <?php echo get_option('drawer_materialize_main_menu_open'); ?> /> Make menu open on front page.</label></td>
</tr>
<!-- END MAIN MENU OPEN ON FRONT PAGE -->
<!-- BEGIN ALTERNATE SUB-MENU ACTIVATION -->
<tr valign="top">
<th scope="row">Alternate sub-menu activation:</th>
<td><label><input type="checkbox" name="materialize_sub_menu_activation" id="materialize_sub_menu_activation" <?php echo get_option('drawer_materialize_sub_menu_activation'); ?> /> Make entire top-level menu item open the sub-menu. If left unchecked, only the arrow icon opens sub-menu.</label></td>
</tr>
<!-- BEGIN ALTERNATE SUB-MENU ACTIVATION -->
<!-- BEGIN CLOSE ON CLICK -->
<tr valign="top">
<th scope="row">Close menu after click?:</th>
<td>
<label><input type="checkbox" name="materialize_close_on_click" id="materialize_close_on_click" <?php echo get_option('drawer_materialize_close_on_click'); ?> /> Close menu when menu item is clicked/tapped (useful on one-page websites where menu links lead to anchors, not new pages).</label>
</td>
</tr>
<!-- END CLOSE ON CLICK -->
<!-- BEGIN MENU FONT SIZE -->
<tr valign="top">
<th scope="row">Menu font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_font_size" id="materialize_menu_font_size" value="<?php echo get_option('drawer_materialize_menu_font_size'); ?>"/> px. Enter custom font size for menu items. If left empty, defaults to 11px
</td>
</tr>
<!-- END MENU FONT SIZE -->
<!-- BEGIN SUBMENU FONT SIZE -->
<tr valign="top">
<th scope="row">Sub-menu font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_submenu_font_size" id="materialize_submenu_font_size" value="<?php echo get_option('drawer_materialize_submenu_font_size'); ?>"/> px. Enter custom font size for sub-menu items. If left empty, defaults to 11px
</td>
</tr>
<!-- END SUBMENU FONT SIZE -->
<!-- BEGIN MENU LINE HEIGHT -->
<tr valign="top">
<th scope="row">Menu items vertical spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_spacing" id="materialize_menu_spacing" value="<?php echo get_option('drawer_materialize_menu_spacing'); ?>"/> px. Enter custom value to increase spacing between between menu items. Example: 5
</td>
</tr>
<!-- END MENU LINE HEIGHT -->
<!-- BEGIN SUBMENU LINE HEIGHT -->
<tr valign="top">
<th scope="row">Sub-menu items vertical spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_submenu_spacing" id="materialize_submenu_spacing" value="<?php echo get_option('drawer_materialize_submenu_spacing'); ?>"/> px. Enter custom value to increase spacing between between sub-menu items. Example: 5
</td>
</tr>
<!-- END SUBMENU LINE HEIGHT -->
<!-- BEGIN MENU LETTER SPACING -->
<tr valign="top">
<th scope="row">Letter spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_letter_spacing" id="materialize_menu_letter_spacing" value="<?php echo get_option('drawer_materialize_menu_letter_spacing'); ?>"/> px. Enter custom letter spacing for menus. If left empty, defaults to 0px
</td>
</tr>
<!-- END MENU LETTER SPACING -->
<!-- BEGIN MENU FONT -->
<tr valign="top">
<th scope="row">Menu font:</th>
<td>
<?php $materialize_menu_font = get_option('drawer_materialize_menu_font'); ?>
<label><input value="materializemenumontserrat" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenumontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializemenumontserratbold" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenumontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializemenuroboto" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenuroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializemenurobotocondensedregular" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenurobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializemenurobotocondensedbold" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenurobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializemenubreeserif" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenubreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializemenudroidserif" type="radio" name="materialize_menu_font" <?php if ($materialize_menu_font=='materializemenudroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
<br><strong>Advanced font feature:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_menu_theme_font" id="materialize_menu_theme_font" value="<?php echo stripslashes(get_option('drawer_materialize_menu_theme_font')); ?>"/> If you know the name of and would like to use one of your theme's fonts, enter it in the textfield above as it appears in the theme's stylesheet (font selection will be automatically overriden)
</td>
</tr>
<!-- END MENU FONT -->
<!-- BEGIN HIDE SUBMENU ARROW DIVIDER -->
<tr valign="top">
<th scope="row">Hide divider?:</th>
<td>
<label><input type="checkbox" name="materialize_hide_submenu_divider" id="materialize_hide_submenu_divider" <?php echo get_option('drawer_materialize_hide_submenu_divider'); ?> /> Hide the sub-menu indication arrow divider.</label>
</td>
</tr>
<!-- END HIDE SUBMENU ARROW DIVIDER -->
<!-- BEGIN MENU ARROW ALIGNMENT -->
<tr valign="top">
<th scope="row">Sub-menu indication arrow position (for main-level items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_arrow_alignment" id="materialize_menu_arrow_alignment" value="<?php echo get_option('drawer_materialize_menu_arrow_alignment'); ?>"/> px. At certain settings, the arrow next to a top-level menu item may need to be vertically re-positioned. If you find the arrow to be misaligned, enter a number here to nudge it into position. Example: 5
</td>
</tr>
<!-- END MENU ARROW ALIGNMENT -->
<!-- BEGIN SUBMENU ARROW ALIGNMENT -->
<tr valign="top">
<th scope="row">Sub-menu indication arrow position (for sub-menu items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_submenu_arrow_alignment" id="materialize_submenu_arrow_alignment" value="<?php echo get_option('drawer_materialize_submenu_arrow_alignment'); ?>"/> px. At certain settings, the arrow next to a sub-level menu item may need to be vertically re-positioned. If you find the arrow to be misaligned, enter a number here to nudge it into position. Example: 5
</td>
</tr>
<!-- END SUBMENU ARROW ALIGNMENT -->
</table>
<!-- END MENU -->
<br><hr><br>
<!-- BEGIN MENU DESCRIPTION -->
<div id="menu-description"></div>
<br>
<br>
<h2>Menu description</h2>
<table class="form-table">
<!-- BEGIN MENU DESCRIPTION FONT SIZE -->
<tr valign="top">
<th scope="row">Font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_description_font_size" id="materialize_menu_description_font_size" value="<?php echo get_option('drawer_materialize_menu_description_font_size'); ?>"/> px. Enter custom font size for menu descriptions. If left empty, defaults to 11px
</td>
</tr>
<!-- END MENU DESCRIPTION FONT SIZE -->
<!-- BEGIN MENU ITEM DESCRIPTION PADDING -->
<tr valign="top">
<th scope="row">Menu item description padding:</th>
<td>
Top: <input style="width:45px;height:35px;" type="text" name="materialize_menu_description_top_padding" id="materialize_menu_description_top_padding" value="<?php echo get_option('drawer_materialize_menu_description_top_padding'); ?>"/> px.
Bottom: <input style="width:45px;height:35px;" type="text" name="materialize_menu_description_bottom_padding" id="materialize_menu_description_bottom_padding" value="<?php echo get_option('drawer_materialize_menu_description_bottom_padding'); ?>"/> px.
<br>Enter custom values to increase spacing around menu item description.
</td>
</tr>
<!-- END MENU ITEM DESCRIPTION PADDING -->
<!-- BEGIN MENU ITEM DESCRIPTION LINE HEIGHT -->
<tr valign="top">
<th scope="row">Menu item description line height:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_description_line_height" id="materialize_menu_description_line_height" value="<?php echo get_option('drawer_materialize_menu_description_line_height'); ?>"/> px. Enter custom value to increase description distance from menu item. If left empty, defaults to 11px
</td>
</tr>
<!-- END MENU ITEM DESCRIPTION LINE HEIGHT -->
<!-- BEGIN MENU ITEM DESCRIPTION FONT -->
<tr valign="top">
<th scope="row">Menu item description font:</th>
<td>
<?php $materialize_menu_description_font = get_option('drawer_materialize_menu_description_font'); ?>
<label><input value="materializemenudescriptionmontserrat" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionmontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializemenudescriptionmontserratbold" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionmontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializemenudescriptionroboto" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializemenudescriptionrobotocondensedregular" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionrobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializemenudescriptionrobotocondensedbold" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionrobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializemenudescriptionbreeserif" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptionbreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializemenudescriptiondroidserif" type="radio" name="materialize_menu_description_font" <?php if ($materialize_menu_description_font=='materializemenudescriptiondroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
</td>
</tr>
<!-- END MENU ITEM DESCRIPTION FONT -->
</table>
<!-- END MENU DESCRIPTION -->
<br><hr><br>
<!-- BEGIN MENU ICONS -->
<div id="menu-icons"></div>
<br>
<br>
<h2>Menu icons</h2>
<table class="form-table">
<!-- BEGIN ICON SIZE -->
<tr valign="top">
<th scope="row">Icon size (for main-level items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_icon_size" id="materialize_menu_icon_size" value="<?php echo get_option('drawer_materialize_menu_icon_size'); ?>"/> px. Enter custom icon size for menu items. If left empty, defaults to menu item size (11px if no custom size set)
</td>
</tr>
<!-- END ICON SIZE -->
<!-- BEGIN ICON SIZE (SUBMENU) -->
<tr valign="top">
<th scope="row">Icon size (for sub-menu items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_submenu_icon_size" id="materialize_submenu_icon_size" value="<?php echo get_option('drawer_materialize_submenu_icon_size'); ?>"/> px. Enter custom icon size for sub-menu items. If left empty, defaults to menu item size (11px if no custom size set)
</td>
</tr>
<!-- END ICON SIZE (SUBMENU) -->
<!-- BEGIN ICON ALIGNMENT -->
<tr valign="top">
<th scope="row">Icon position (for main-level items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_menu_icon_alignment" id="materialize_menu_icon_alignment" value="<?php echo get_option('drawer_materialize_menu_icon_alignment'); ?>"/> px. If you have set custom icon and text sizes that are radically different from one another, the icon next to a top-level menu item may need to be vertically re-positioned. If you find the icon to be misaligned, enter a number here to nudge it into position. Example: 5
</td>
</tr>
<!-- END ICON ALIGNMENT -->
<!-- BEGIN ICON ALIGNMENT (SUBMENU) -->
<tr valign="top">
<th scope="row">Sub-menu icon position (for sub-menu items):</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_submenu_icon_alignment" id="materialize_submenu_icon_alignment" value="<?php echo get_option('drawer_materialize_submenu_icon_alignment'); ?>"/> px. If you have set custom icon and text sizes that are radically different from one another, the icon next to a sub-level menu item may need to be vertically re-positioned. If you find the icon to be misaligned, enter a number here to nudge it into position. Example: 5
</td>
</tr>
<!-- END ICON ALIGNMENT (SUBMENU) -->
<!-- BEGIN DON'T LOAD FONTAWESOME -->
<tr valign="top">
<th scope="row">Don't load FontAwesome:</th>
<td>
<label><input type="checkbox" name="materialize_fa_no_load" id="materialize_fa_no_load" <?php echo get_option('drawer_materialize_fa_no_load'); ?> /> Don't load the FontAwesome icon set.</label><br>
(useful if you don't use any icons with your menu items, or if your theme already loads FontAwesome).
</td>
</tr>
<!-- END DON'T LOAD FONTAWESOME -->
</table>
<!-- END MENU ICONS -->
<br><hr><br>
<!-- BEGIN WIDGETS -->
<div id="widgets"></div>
<br>
<br>
<h2>Widgets</h2>
<table class="form-table">
<!-- BEGIN WIDGET TOP DISTANCE -->
<tr valign="top">
<th scope="row">Top distance:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_top_distance" id="materialize_widget_top_distance" value="<?php echo get_option('drawer_materialize_widget_top_distance'); ?>"/> px. Enter custom distance from top. Useful if you'd like to have more space between the menu and widgets. If left empty, defaults to 30px.
</td>
</tr>
<!-- END WIDGET TOP DISTANCE -->
<!-- BEGIN WIDGET TITLE FONT SIZE -->
<tr valign="top">
<th scope="row">Widget title font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_title_font_size" id="materialize_widget_title_font_size" value="<?php echo get_option('drawer_materialize_widget_title_font_size'); ?>"/> px. Enter custom font size for widget titles. If left empty, defaults to 14px
</td>
</tr>
<!-- END WIDGET TITLE FONT SIZE -->
<!-- BEGIN WIDGET TITLE LETTER SPACING -->
<tr valign="top">
<th scope="row">Widget title letter spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_title_letter_spacing" id="materialize_widget_title_letter_spacing" value="<?php echo get_option('drawer_materialize_widget_title_letter_spacing'); ?>"/> px. Enter custom letter spacing for widget titles. If left empty, defaults to 0px
</td>
</tr>
<!-- END WIDGET TITLE LETTER SPACING -->
<!-- BEGIN WIDGET TITLE LINE HEIGHT -->
<tr valign="top">
<th scope="row">Widget title line height:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_title_line_height" id="materialize_widget_title_line_height" value="<?php echo get_option('drawer_materialize_widget_title_line_height'); ?>"/> px. Enter custom line height for widget titles. Useful if your text in for example the text widget spans multiple lines.
</td>
</tr>
<!-- END WIDGET TITLE LINE HEIGHT -->
<!-- BEGIN WIDGET TITLE FONT -->
<tr valign="top">
<th scope="row">Widget title font:</th>
<td>
<?php $materialize_widget_font = get_option('drawer_materialize_widget_title_font'); ?>
<label><input value="materializewidgettitlemontserrat" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitlemontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializewidgettitlemontserratbold" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitlemontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializewidgettitleroboto" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitleroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializewidgettitlerobotocondensedregular" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitlerobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializewidgettitlerobotocondensedbold" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitlerobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializewidgettitlebreeserif" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitlebreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializewidgettitledroidserif" type="radio" name="materialize_widget_title_font" <?php if ($materialize_widget_font=='materializewidgettitledroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
<br><strong>Advanced font feature:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_widget_title_theme_font" id="materialize_widget_title_theme_font" value="<?php echo stripslashes(get_option('drawer_materialize_widget_title_theme_font')); ?>"/> If you know the name of and would like to use one of your theme's fonts, enter it in the textfield above as it appears in the theme's stylesheet (font selection will be automatically overriden)
</td>
</tr>
<!-- END WIDGET TITLE FONT -->
<!-- BEGIN WIDGET FONT SIZE -->
<tr valign="top">
<th scope="row">Widget font size:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_font_size" id="materialize_widget_font_size" value="<?php echo get_option('drawer_materialize_widget_font_size'); ?>"/> px. Enter custom font size for widgets. If left empty, defaults to 14px
</td>
</tr>
<!-- END WIDGET FONT SIZE -->
<!-- BEGIN WIDGET LETTER SPACING -->
<tr valign="top">
<th scope="row">Widget letter spacing:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_letter_spacing" id="materialize_widget_letter_spacing" value="<?php echo get_option('drawer_materialize_widget_letter_spacing'); ?>"/> px. Enter custom letter spacing for widgets. If left empty, defaults to 0px
</td>
</tr>
<!-- END WIDGET LETTER SPACING -->
<!-- BEGIN WIDGET LINE HEIGHT -->
<tr valign="top">
<th scope="row">Widget line height:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_widget_line_height" id="materialize_widget_line_height" value="<?php echo get_option('drawer_materialize_widget_line_height'); ?>"/> px. Enter custom line height for widgets. Useful if your text in for example the text widget spans multiple lines.
</td>
</tr>
<!-- END WIDGET LINE HEIGHT -->
<!-- BEGIN WIDGET FONT -->
<tr valign="top">
<th scope="row">Widget font:</th>
<td>
<?php $materialize_widget_font = get_option('drawer_materialize_widget_font'); ?>
<label><input value="materializewidgetmontserrat" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetmontserrat') { echo 'checked'; } ?>> Montserrat (regular)</label><br>
<label><input value="materializewidgetmontserratbold" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetmontserratbold') { echo 'checked'; } ?>> Montserrat (bold)</label><br>
<label><input value="materializewidgetroboto" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetroboto') { echo 'checked'; } ?>> Roboto</label><br>
<label><input value="materializewidgetrobotocondensedregular" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetrobotocondensedregular') { echo 'checked'; } ?>> Roboto Condensed (regular)</label><br>
<label><input value="materializewidgetrobotocondensedbold" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetrobotocondensedbold') { echo 'checked'; } ?>> Roboto Condensed (bold)</label><br>
<label><input value="materializewidgetbreeserif" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetbreeserif') { echo 'checked'; } ?>> Bree Serif</label><br>
<label><input value="materializewidgetdroidserif" type="radio" name="materialize_widget_font" <?php if ($materialize_widget_font=='materializewidgetdroidserif') { echo 'checked'; } ?>> Droid Serif</label><br>
<br><strong>Advanced font feature:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_widget_theme_font" id="materialize_widget_theme_font" value="<?php echo stripslashes(get_option('drawer_materialize_widget_theme_font')); ?>"/> If you know the name of and would like to use one of your theme's fonts, enter it in the textfield above as it appears in the theme's stylesheet (font selection will be automatically overriden)
</td>
</tr>
<!-- END WIDGET FONT -->
</table>
<!-- END WIDGETS -->
<br><hr><br>
<!-- BEGIN BACKGROUND DETAILS -->
<div id="background"></div>
<br>
<br>
<h2>Background</h2>
<table class="form-table">
<!-- BEGIN BACKGROUND IMAGE -->
<tr valign="top">
<th scope="row">Image URL:</th>
<td>
<input style="width:100%;" type="text" name="materialize_background_image" id="materialize_background_image" value="<?php echo get_option('drawer_materialize_background_image'); ?>"/>
<br> To use a background image, enter its URL in the field above.
</td>
</tr>
<!-- END BACKGROUND IMAGE -->
<!-- BEGIN BACKGROUND IMAGE HORIZONTAL POSITION -->
<tr valign="top">
<th scope="row">Background image horizontal position:</th>
<td>
<?php $materialize_background_horizontal_alignment = get_option('drawer_materialize_background_horizontal_alignment'); ?>
<label><input value="materializebackgroundleft" type="radio" name="materialize_background_horizontal_alignment" <?php if ($materialize_background_horizontal_alignment=='materializebackgroundleft') { echo 'checked'; } ?>> Left</label><br>
<label><input value="materializebackgroundcenter" type="radio" name="materialize_background_horizontal_alignment" <?php if ($materialize_background_horizontal_alignment=='materializebackgroundcenter') { echo 'checked'; } ?>> Center</label><br>
<label><input value="materializebackgroundright" type="radio" name="materialize_background_horizontal_alignment" <?php if ($materialize_background_horizontal_alignment=='materializebackgroundright') { echo 'checked'; } ?>> Right</label><br>
</td>
</tr>
<!-- END BACKGROUND IMAGE HORIZONTAL POSITION -->
<!-- BEGIN BACKGROUND IMAGE VERTICAL POSITION -->
<tr valign="top">
<th scope="row">Background image vertical position::</th>
<td>
<?php $materialize_background_vertical_alignment = get_option('drawer_materialize_background_vertical_alignment'); ?>
<label><input value="materializebackgroundtop" type="radio" name="materialize_background_vertical_alignment" <?php if ($materialize_background_vertical_alignment=='materializebackgroundtop') { echo 'checked'; } ?>> Top</label><br>
<label><input value="materializebackgroundmiddle" type="radio" name="materialize_background_vertical_alignment" <?php if ($materialize_background_vertical_alignment=='materializebackgroundmiddle') { echo 'checked'; } ?>> Middle</label><br>
<label><input value="materializebackgroundbottom" type="radio" name="materialize_background_vertical_alignment" <?php if ($materialize_background_vertical_alignment=='materializebackgroundbottom') { echo 'checked'; } ?>> Bottom</label><br>
</td>
</tr>
<!-- END BACKGROUND IMAGE VERTICAL POSITION -->
<!-- BEGIN BACKGOUND PATTERN -->
<tr valign="top">
<th scope="row">Pattern image:</th>
<td>
<label><input type="checkbox" name="materialize_image_pattern" id="materialize_image_pattern" <?php echo get_option('drawer_materialize_image_pattern'); ?> /> Tick this is if you wish the above image to be shown as a pattern.
<br>If unchecked, image will be shown in full-size 'cover' style.</label><br>
</td>
</tr>
<!-- END BACKGOUND PATTERN -->
<!-- BEGIN BACKGROUND IMAGE OPACITY -->
<tr valign="top">
<th scope="row">Background image opacity:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_background_image_opacity" id="materialize_background_image_opacity" value="<?php echo get_option('drawer_materialize_background_image_opacity'); ?>"/>
<br> Enter custom background image opacity. From 0-1 (example: 0.5) If left empty, defaults to 0.1
</td>
</tr>
<!-- END BACKGROUND IMAGE OPACITY -->
<!-- BEGIN BACKGROUND OPACITY -->
<tr valign="top">
<th scope="row">Background color opacity:</th>
<td>
<input style="width:45px;height:35px;" type="text" name="materialize_background_color_opacity" id="materialize_background_color_opacity" value="<?php echo get_option('drawer_materialize_background_color_opacity'); ?>"/>
<br> Enter custom background color opacity. From 0-1 (example: 0.95) If left empty, defaults to 1
</td>
</tr>
<!-- END BACKGROUND OPACITY -->
</table>
<!-- END BACKGROUND DETAILS -->
<br><hr><br>
<!-- BEGIN HIDE BETWEEN RESOLUTIONS -->
<div id="hide-at-certain-width-resolution"></div>
<br>
<br>
<h2>Hide at certain width/resolution</h2>
<table class="form-table">
<tr valign="top">
<th scope="row">Hide at certain width/resolution:</th>
<td>
Hide Materialize menu if browser width or screen resolution is between <input style="width:50px;" type="text" name="materialize_smaller_than" id="materialize_smaller_than" value="<?php echo get_option('drawer_materialize_smaller_than'); ?>"/> and <input style="width:50px;" type="text" name="materialize_larger_than" id="materialize_larger_than" value="<?php echo get_option('drawer_materialize_larger_than'); ?>"/> pixels (fill both fields).
<br><strong>Example:</strong> if you'd like to show Materialize on desktop only, then enter the values as 0 and 500. If fields are empty, Materialize will be visible at all browser widths and resolutions.
<br><br><strong>Advanced feature - hide theme menu:</strong><br>
<input style="width:100%;height:35px;" type="text" name="materialize_hide_theme_menu" id="materialize_hide_theme_menu" value="<?php echo stripslashes(get_option('drawer_materialize_hide_theme_menu')); ?>"/> If you've set Materialize to show only at a certain resolution and know the class/ID of your theme menu and would like to hide it when Materialize is visible, enter the class/ID in this field (example: "#my-theme-menu"). Multiple classes/IDs can be entered (separate with comma as you would in a stylesheet).
</td>
</tr>
</table>
<!-- END HIDE BETWEEN RESOLUTIONS -->
<br><hr><br>
<!-- BEGIN 'SAVE OPTIONS' BUTTON -->
<p><input type="submit" name="search" value="Save Options" class="button button-primary" /></p>
<!-- BEGIN 'SAVE OPTIONS' BUTTON -->
</form>
</div>
<?php }
function drawer_materialize_update() {
/* horizontal alignment */
if ( isset ($_POST['materialize_horizontal_alignment']) == 'true' ) {
update_option('drawer_materialize_horizontal_alignment', $_POST['materialize_horizontal_alignment']); }
/* vertical alignment */
if ( isset ($_POST['materialize_vertical_alignment']) == 'true' ) {
update_option('drawer_materialize_vertical_alignment', $_POST['materialize_vertical_alignment']); }
/* menu button animation */
if ( isset ($_POST['materialize_button_animation']) == 'true' ) {
update_option('drawer_materialize_button_animation', $_POST['materialize_button_animation']); }
/* menu button animation speed */
update_option('drawer_materialize_menu_button_speed', $_POST['materialize_menu_button_speed']);
/* menu animation */
if ( isset ($_POST['materialize_menu_animation']) == 'true' ) {
update_option('drawer_materialize_menu_animation', $_POST['materialize_menu_animation']); }
/* menu button style */
if ( isset ($_POST['materialize_menu_button_style']) == 'true' ) {
update_option('drawer_materialize_menu_button_style', $_POST['materialize_menu_button_style']); }
/* absolute/fixed positioning */
if ( isset ($_POST['materialize_absolute_position'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_absolute_position', $display);
/* logo/menu button/search button positioning */
if ( isset ($_POST['materialize_heading_positioning']) == 'true' ) {
update_option('drawer_materialize_heading_positioning', $_POST['materialize_heading_positioning']); }
/* menu button opacity */
update_option('drawer_materialize_menu_button_opacity', $_POST['materialize_menu_button_opacity']);
/* hide logo */
if ( isset ($_POST['materialize_hide_logo'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_hide_logo', $display);
/* hide search */
if ( isset ($_POST['materialize_hide_search'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_hide_search', $display);
/* hide search button divider */
if ( isset ($_POST['materialize_hide_search_divider'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_hide_search_divider', $display);
/* search text */
update_option('drawer_materialize_search_text', $_POST['materialize_search_text']);
/* show header background */
if ( isset ($_POST['materialize_show_header'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_show_header', $display);
/* show header background shadow */
if ( isset ($_POST['materialize_show_header_shadow'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_show_header_shadow', $display);
/* header background shadow opacity */
update_option('drawer_materialize_header_background_shadow_opacity', $_POST['materialize_header_background_shadow_opacity']);
/* show header + search when menu open */
if ( isset ($_POST['materialize_show_header_search_above'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_show_header_search_above', $display);
/* header background opacity */
update_option('drawer_materialize_header_background_opacity', $_POST['materialize_header_background_opacity']);
/* push down site */
if ( isset ($_POST['materialize_site_top'])=='on') { $display = 'checked'; } else { $display = ''; }
update_option('drawer_materialize_site_top', $display);
/* menu content top distance */
update_option('drawer_materialize_content_top_distance', $_POST['materialize_content_top_distance']);
/* heading text */
update_option('drawer_materialize_heading', $_POST['materialize_heading']);
/* heading link */
update_option('drawer_materialize_heading_link', $_POST['materialize_heading_link']);
/* heading font size */