forked from mirai-mamori/Sakurairo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.php
More file actions
2013 lines (1747 loc) · 76 KB
/
options.php
File metadata and controls
2013 lines (1747 loc) · 76 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
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
* If the identifier changes, it'll appear as if the options have been reset.
*/
function optionsframework_option_name()
{
// 从样式表获取主题名称
$themename = wp_get_theme();
$themename = preg_replace("/\W/", "_", strtolower($themename));
$optionsframework_settings = get_option('optionsframework');
$optionsframework_settings['id'] = $themename;
update_option('optionsframework', $optionsframework_settings);
}
/**
* Defines an array of options that will be used to generate the settings page and be saved in the database.
* When creating the 'id' fields, make sure to use all lowercase and no spaces.
*
* If you are making your theme translatable, you should replace 'sakurairo'
* with the actual text domain for your theme.
*
* Frame from: https://github.com/devinsays/options-framework-plugin/
*/
function optionsframework_options()
{
// 测试数据
$test_array = array(
'one' => __('1', 'sakurairo'),
'two' => __('2', 'sakurairo'),
'three' => __('3', 'sakurairo'),
'four' => __('4', 'sakurairo'),
'five' => __('5', 'sakurairo'),
'six' => __('6', 'sakurairo'),
'seven' => __('7', 'sakurairo'),
);
// 复选框数组
$multicheck_array = array(
'one' => __('1', 'sakurairo'),
'two' => __('2', 'sakurairo'),
'three' => __('3', 'sakurairo'),
'four' => __('4', 'sakurairo'),
'five' => __('5', 'sakurairo'),
);
// 复选框默认值
$multicheck_defaults = array(
'one' => '1',
'five' => '1',
);
// 背景默认值
$background_defaults = array(
'color' => '',
'image' => 'https://view.moezx.cc/images/2018/12/23/knights-of-the-frozen-throne-8k-qa.jpg',
'repeat' => 'repeat',
'position' => 'top center',
'attachment' => 'scroll');
// 版式默认值
$typography_defaults = array(
'size' => '15px',
'face' => 'georgia',
'style' => 'bold',
'color' => '#bada55');
// 版式设置选项
$typography_options = array(
'sizes' => array('6', '12', '14', '16', '20'),
'faces' => array('Helvetica Neue' => 'Helvetica Neue', 'Arial' => 'Arial'),
'styles' => array('normal' => '普通', 'bold' => '粗体'),
'color' => false,
);
// 将所有分类(categories)加入数组
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
// 将所有标签(tags)加入数组
$options_tags = array();
$options_tags_obj = get_tags();
foreach ($options_tags_obj as $tag) {
$options_tags[$tag->term_id] = $tag->name;
}
// 将所有页面(pages)加入数组
$options_pages = array();
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
$options_pages[''] = 'Select a page:';
foreach ($options_pages_obj as $page) {
$options_pages[$page->ID] = $page->post_title;
}
// 如果使用图片单选按钮, define a directory path
$imagepath = get_template_directory_uri() . '/images/';
$options = array();
//基本设置
$options[] = array(
'name' => __('Basic', 'sakurairo'),
'type' => 'heading');
$options[] = array(
'name' => __('Support', 'sakurairo'),
'desc' => __(' ', 'sakurairo'),
'id' => 'theme_support',
'std' => 'tag',
'type' => "images",
'options' => array(
'tag' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/qqgroup.png',
),
);
$options[] = array(
'name' => __('Site title', 'sakurairo'),
'desc' => __('Mashiro\'s Blog', 'sakurairo'),
'id' => 'site_name',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Author', 'sakurairo'),
'desc' => __('Mashiro', 'sakurairo'),
'id' => 'author_name',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Personal avatar', 'sakurairo'),
'desc' => __('The best size is 130px*130px.', 'sakurairo'),
'id' => 'focus_logo',
'type' => 'upload');
$options[] = array(
'name' => __('Text LOGO', 'sakurairo'),
'desc' => __('The home page does not display the avatar above, but displays a paragraph of text (use the avatar above if left blank).The text is recommended not to be too long, about 16 bytes is appropriate.', 'sakurairo'),
'id' => 'focus_logo_text',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Logo', 'sakurairo'),
'desc' => __('The best height size is 40px。', 'sakurairo'),
'id' => 'akina_logo',
'type' => 'upload');
$options[] = array(
'name' => __('Favicon', 'sakurairo'),
'desc' => __('It is the small logo on the browser tab, fill in the url', 'sakurairo'),
'id' => 'favicon_link',
'std' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/favicon.ico',
'type' => 'text');
$options[] = array(
'name' => __('Custom keywords and descriptions ', 'sakurairo'),
'desc' => __('Customize keywords and descriptions after opening', 'sakurairo'),
'id' => 'akina_meta',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Site keywords', 'sakurairo'),
'desc' => __('Each keyword is divided by a comma "," and the number is within 5.', 'sakurairo'),
'id' => 'akina_meta_keywords',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Site descriptions', 'sakurairo'),
'desc' => __('Describe the site in concise text, with a maximum of 120 words.', 'sakurairo'),
'id' => 'akina_meta_description',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Expand the nav menu', 'sakurairo'),
'desc' => __('Check to enable, default shrink', 'sakurairo'),
'id' => 'shownav',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Head decoration', 'sakurairo'),
'desc' => __('Enable by default, check off, display on the article page, separate page and category page', 'sakurairo'),
'id' => 'patternimg',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Search button', 'sakurairo'),
'id' => 'top_search',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Home article style', 'sakurairo'),
'id' => 'post_list_style',
'std' => "imageflow",
'type' => "radio",
'options' => array(
'standard' => __('Standard', 'sakurairo'),
'imageflow' => __('Graphic', 'sakurairo'),
));
$options[] = array(
'name' => __('Home article feature images (only valid for standard mode)', 'sakurairo'),
'id' => 'list_type',
'std' => "round",
'type' => "radio",
'options' => array(
'round' => __('Round', 'sakurairo'),
'square' => __('Square', 'sakurairo'),
));
$options[] = array(
'name' => __('Home article feature images alignment (only for graphic mode, default left and right alternate)', 'sakurairo'),
'id' => 'feature_align',
'std' => "alternate",
'type' => "radio",
'options' => array(
'left' => __('Left', 'sakurairo'),
'right' => __('Right', 'sakurairo'),
'alternate' => __('Alternate', 'sakurairo'),
));
$options[] = array(
'name' => __('Paging mode', 'sakurairo'),
'id' => 'pagenav_style',
'std' => "ajax",
'type' => "radio",
'options' => array(
'ajax' => __('Ajax load', 'sakurairo'),
'np' => __('Previous and next page', 'sakurairo'),
));
$options[] = array(
'name' => __('Automatically load the next page', 'sakurairo'),
'desc' => __('(seconds) Set to automatically load the next page time, the default is not automatically loaded', 'sakurairo'),
'id' => 'auto_load_post',
'std' => '233',
'type' => 'select',
'options' => array(
'0' => __('0', 'sakurairo'),
'1' => __('1', 'sakurairo'),
'2' => __('2', 'sakurairo'),
'3' => __('3', 'sakurairo'),
'4' => __('4', 'sakurairo'),
'5' => __('5', 'sakurairo'),
'6' => __('6', 'sakurairo'),
'7' => __('7', 'sakurairo'),
'8' => __('8', 'sakurairo'),
'9' => __('9', 'sakurairo'),
'10' => __('10', 'sakurairo'),
'233' => __('Do not load automatically', 'sakurairo'),
));
$options[] = array(
'name' => __('Footer info', 'sakurairo'),
'desc' => __('Footer description, support for HTML code', 'sakurairo'),
'id' => 'footer_info',
'std' => 'Copyright © by Hitomi All Rights Reserved.',
'type' => 'textarea');
$options[] = array(
'name' => __('About', 'sakurairo'),
'desc' => sprintf(__('Sakurairo v %s | <a href="https://asuhe.jp/daily/sakurairo-user-manual/">Theme document</a> | <a href="https://github.com/mirai-mamori/Sakurairo">Source code</a><a href="https://github.com/mirai-mamori/Sakurairo/releases/latest"><img src="https://img.shields.io/github/v/release/mirai-mamori/Sakurairo.svg?style=flat-square" alt="GitHub release"></a>', 'sakurairo'), SAKURA_VERSION),
'id' => 'theme_intro',
'std' => '',
'type' => 'typography ');
$options[] = array(
'name' => __('Check for Updates', 'sakurairo'),
'desc' => '<a href="https://github.com/mirai-mamori/Sakurairo/releases/latest">Download the latest version</a>',
'id' => "release_info",
'std' => "tag",
'type' => "images",
'options' => array(
'tag' => 'https://img.shields.io/github/v/release/mirai-mamori/Sakurairo.svg?style=flat-square',
'tag2' => 'https://img.shields.io/github/release-date/mirai-mamori/Sakurairo?style=flat-square',
'tag3' => 'https://data.jsdelivr.com/v1/package/gh/mirai-mamori/sakurairo/badge',
),
);
//首页设置
$options[] = array(
'name' => __('HomePage', 'sakurairo'),
'type' => 'heading');
$options[] = array(
'name' => __('Main Switch', 'sakurairo'),
'desc' => __('Default on, check off', 'sakurairo'),
'id' => 'main-switch',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Information Bar', 'sakurairo'),
'desc' => __('It is on by default and checked off to display the avatar / text logo, signature bar and social card.', 'sakurairo'),
'id' => 'infor-bar',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Social Card', 'sakurairo'),
'desc' => __('On by default, check off. When the social card is turned off, the switch button of background random graph and social network icon will not be displayed', 'sakurairo'),
'id' => 'social-card',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Background Random Graphs Switch', 'sakurairo'),
'desc' => __('Default on (check), cancel check to turn off display. If the check is not checked, the switch button of background random graph will be turned off', 'sakurairo'),
'id' => 'background-rgs',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Information Bar Style', 'sakurairo'),
'id' => 'infor-bar-style',
'std' => "v1",
'type' => "radio",
'options' => array(
'v2' => __('Social card and signature merge', 'sakurairo'),
'v1' => __('Social card and signature independent', 'sakurairo'),
));
$options[] = array(
'name' => __('Signature Bar Fillet', 'sakurairo'),
'desc' => __('Fill in the number, the recommended value is 10 to 20', 'sakurairo'),
'id' => 'info-radius',
'std' => '15',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Social Card Fillet', 'sakurairo'),
'desc' => __('Fill in the number, the recommended value is 10 to 20', 'sakurairo'),
'id' => 'img-radius',
'std' => '15',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Information Bar Avatar Fillet', 'sakurairo'),
'desc' => __('Fill in the number, the recommended value is 90 to 110', 'sakurairo'),
'id' => 'head-radius',
'std' => '100',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Cover Random Graphs Option', 'sakurairo'),
'desc' => __('Select how to call the cover random image', 'sakurairo'),
'id' => 'cover_cdn_options',
'std' => "type_3",
'type' => "select",
'options' => array(
'type_1' => __('Webp Optimized Random Graphs', 'sakurairo'),
'type_2' => __('Local Random Graphs', 'sakurairo'),
'type_3' => __('External API Random Graphs', 'sakurairo'),
)
);
$options[] = array(
'name' => __('Multi Terminal Separation of Home Random Graphs', 'sakurairo'),
'desc' => __('Default on, check off', 'sakurairo'),
'id' => 'cover_beta',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Webp Optimization / External API PC Random Graphs Url', 'sakurairo'),
'desc' => sprintf(__('Fill in the manifest path for random picture display, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>. If you select webp images above, click <a href = "%s">here</a> to update manifest', 'sakurairo'), rest_url('sakura/v1/database/update')),
'id' => 'cover_cdn',
'std' => 'https://api.btstu.cn/sjbz/api.php?lx=dongman&format=images',
'type' => 'text');
$options[] = array(
'name' => __('External API Mobile Random Graphs Url', 'sakurairo'),
'desc' => __('When you use the external API random graph and check the multi terminal separation option, please fill in the random graph API mobile terminal address here, otherwise the mobile terminal random graph will be blank','sakurairo'),
'id' => 'cover_cdn_mobile',
'std' => 'https://api.uomg.com/api/rand.img2?sort=二次元&format=images',
'type' => 'text');
$options[] = array(
'name' => __('Full-Screen Display', 'sakurairo'),
'desc' => __('Default on, check off', 'sakurairo'),
'id' => 'focus_height',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Cover Video', 'sakurairo'),
'desc' => __('Check on', 'sakurairo'),
'id' => 'focus_amv',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Cover Video Loop', 'sakurairo'),
'desc' => __('Check to enable, the video will continue to play automatically, you need to enable Pjax', 'sakurairo'),
'id' => 'focus_mvlive',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Video Url', 'sakurairo'),
'desc' => __('The source address of the video, the address is spliced below the video name, the slash is not required at the end of the address', 'sakurairo'),
'id' => 'amv_url',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Video Name', 'sakurairo'),
'desc' => __('abc.mp4, just fill in the video file name abc, multiple videos separated by commas such as abc, efg, do not care about the order, because the loading is random extraction', 'sakurairo'),
'id' => 'amv_title',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Cover Random Graphs Filter', 'sakurairo'),
'id' => 'focus_img_filter',
'std' => "filter-nothing",
'type' => "radio",
'options' => array(
'filter-nothing' => __('Nothing', 'sakurairo'),
'filter-undertint' => __('Undertint', 'sakurairo'),
'filter-dim' => __('Dim', 'sakurairo'),
'filter-grid' => __('Grid', 'sakurairo'),
'filter-dot' => __('Dot', 'sakurairo'),
));
$options[] = array(
'name' => __('Announcement', 'sakurairo'),
'desc' => __('Default off, check on', 'sakurairo'),
'id' => 'head_notice',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Announcement Content', 'sakurairo'),
'desc' => __('Announcement content, the text exceeds 142 bytes will be scrolled display (mobile device is invalid)', 'sakurairo'),
'id' => 'notice_title',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area', 'sakurairo'),
'desc' => __('Default on', 'sakurairo'),
'id' => 'focus-area',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Focus Area Style', 'sakurairo'),
'id' => 'focus-area-style',
'std' => "left_and_right",
'type' => "radio",
'options' => array(
'left_and_right' => __('Alternate left and right', 'sakurairo'),
'bottom_to_top' => __('From bottom to top', 'sakurairo'),
));
$options[] = array(
'name' => __('Focus Area Title', 'sakurairo'),
'desc' => __('Default is 聚焦, you can also change it to other, of course you can\'t use it as an advertisement!Not allowed!!', 'sakurairo'),
'id' => 'focus-area-title',
'std' => '聚焦',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area First Image', 'sakurairo'),
'desc' => __('size 257px*160px', 'sakurairo'),
'id' => 'feature1_img',
'std' => "https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/temp.png",
'type' => 'upload');
$options[] = array(
'name' => __('Focus Area First Title', 'sakurairo'),
'desc' => __('Focus Area First Title', 'sakurairo'),
'id' => 'feature1_title',
'std' => 'First Focus',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area First Description', 'sakurairo'),
'desc' => __('Focus Area First Description', 'sakurairo'),
'id' => 'feature1_description',
'std' => 'This is a brief introduction of the focus area',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area First Link', 'sakurairo'),
'desc' => __('Focus Area First Link', 'sakurairo'),
'id' => 'feature1_link',
'std' => '#',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Second Image', 'sakurairo'),
'desc' => __('size 257px*160px', 'sakurairo'),
'id' => 'feature2_img',
'std' => "https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/temp.png",
'type' => 'upload');
$options[] = array(
'name' => __('Focus Area Second Title', 'sakurairo'),
'desc' => __('Focus Area Second Title', 'sakurairo'),
'id' => 'feature2_title',
'std' => 'Second Focus',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Second Description', 'sakurairo'),
'desc' => __('Focus Area Second Description', 'sakurairo'),
'id' => 'feature2_description',
'std' => 'This is a brief introduction of the focus area',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Second Link', 'sakurairo'),
'desc' => __('Focus Area Second Link', 'sakurairo'),
'id' => 'feature2_link',
'std' => '#',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Third Image', 'sakurairo'),
'desc' => __('size 257px*160px', 'sakurairo'),
'id' => 'feature3_img',
'std' => "https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/temp.png",
'type' => 'upload');
$options[] = array(
'name' => __('Focus Area Third Title', 'sakurairo'),
'desc' => __('Focus Area Third Title', 'sakurairo'),
'id' => 'feature3_title',
'std' => 'Third Focus',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Third Description', 'sakurairo'),
'desc' => __('Focus Area Third Description', 'sakurairo'),
'id' => 'feature3_description',
'std' => 'This is a brief introduction of the focus area',
'type' => 'text');
$options[] = array(
'name' => __('Focus Area Third Link', 'sakurairo'),
'desc' => __('Focus Area Third Link', 'sakurairo'),
'id' => 'feature3_link',
'std' => '#',
'type' => 'text');
$options[] = array(
'name' => __('Main page article title', 'sakurairo'),
'desc' => __('Default is 記事, you can also change it to other, of course you can\'t use it as an advertisement!Not allowed!!', 'sakurairo'),
'id' => 'homepage_title',
'std' => '記事',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Home page article details Icon Switch', 'sakurairo'),
'desc' => __('Default on, check off', 'sakurairo'),
'id' => 'hpage-art-dis',
'std' => '0',
'type' => 'checkbox');
//文章页
$options[] = array(
'name' => __('Post', 'sakurairo'),
'type' => 'heading');
$options[] = array(
'name' => __('Post style', 'sakurairo'),
'id' => 'entry_content_theme',
'std' => "sakurairo",
'type' => "radio",
'options' => array(
'sakurairo' => __('Default Style', 'sakurairo'),
'github' => __('GitHub Style', 'sakurairo'),
));
$options[] = array(
'name' => __('Post like', 'sakurairo'),
'id' => 'post_like',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Post share', 'sakurairo'),
'id' => 'post_share',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Previous and Next', 'sakurairo'),
'id' => 'post_nepre',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Author profile', 'sakurairo'),
'id' => 'author_profile',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Comment shrink', 'sakurairo'),
'id' => 'toggle-menu',
'std' => "yes",
'type' => "radio",
'options' => array(
'yes' => __('Open', 'sakurairo'),
'no' => __('Close', 'sakurairo'),
));
$options[] = array(
'name' => __('Comment Textarea image', 'sakurairo'),
'desc' => __('NO image if left this blank', 'sakurairo'),
'id' => 'comment-image',
'type' => 'upload');
$options[] = array(
'name' => __('Author information at the end of the paper', 'sakurairo'),
'desc' => __('Check to enable', 'sakurairo'),
'id' => 'show_authorprofile',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Post lincenses', 'sakurairo'),
'desc' => __('Check close', 'sakurairo'),
'id' => 'post-lincenses',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Alipay reward', 'sakurairo'),
'desc' => __('Alipay qrcode', 'sakurairo'),
'id' => 'alipay_code',
'type' => 'upload');
$options[] = array(
'name' => __('Wechat reward', 'sakurairo'),
'desc' => __('Wechat qrcode ', 'sakurairo'),
'id' => 'wechat_code',
'type' => 'upload');
//社交选项
$options[] = array(
'name' => __('Social', 'sakurairo'),
'type' => 'heading');
$options[] = array(
'name' => __('Wechat', 'sakurairo'),
'desc' => __('Wechat qrcode', 'sakurairo'),
'id' => 'wechat',
'type' => 'upload');
$options[] = array(
'name' => __('Sina Weibo', 'sakurairo'),
'desc' => __('Sina Weibo address', 'sakurairo'),
'id' => 'sina',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Tencent QQ', 'sakurairo'),
'desc' => __('tencent://message/?uin={{QQ number}}. for example, tencent://message/?uin=123456', 'sakurairo'),
'id' => 'qq',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Telegram', 'sakurairo'),
'desc' => __('Telegram link', 'sakurairo'),
'id' => 'telegram',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Qzone', 'sakurairo'),
'desc' => __('Qzone address', 'sakurairo'),
'id' => 'qzone',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('GitHub', 'sakurairo'),
'desc' => __('GitHub address', 'sakurairo'),
'id' => 'github',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Lofter', 'sakurairo'),
'desc' => __('Lofter address', 'sakurairo'),
'id' => 'lofter',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('BiliBili', 'sakurairo'),
'desc' => __('BiliBili address', 'sakurairo'),
'id' => 'bili',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Youku video', 'sakurairo'),
'desc' => __('Youku video address', 'sakurairo'),
'id' => 'youku',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Netease Cloud Music', 'sakurairo'),
'desc' => __('Netease Cloud Music address', 'sakurairo'),
'id' => 'wangyiyun',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Twitter', 'sakurairo'),
'desc' => __('Twitter address', 'sakurairo'),
'id' => 'twitter',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Facebook', 'sakurairo'),
'desc' => __('Facebook address', 'sakurairo'),
'id' => 'facebook',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Jianshu', 'sakurairo'),
'desc' => __('Jianshu address', 'sakurairo'),
'id' => 'jianshu',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('CSDN', 'sakurairo'),
'desc' => __('CSND community address', 'sakurairo'),
'id' => 'csdn',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Zhihu', 'sakurairo'),
'desc' => __('Zhihu address', 'sakurairo'),
'id' => 'zhihu',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Email-name', 'sakurairo'),
'desc' => __('The name part of name@domain.com, only the frontend has js runtime environment can get the full address, you can rest assured to fill in', 'sakurairo'),
'id' => 'email_name',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Email-domain', 'sakurairo'),
'desc' => __('The domain.com part of name@domain.com', 'sakurairo'),
'id' => 'email_domain',
'std' => '',
'type' => 'text');
//前台设置
$options[] = array(
'name' => __('Foreground', 'sakurairo'),
'type' => 'heading');
$options[] = array(
'name' => __('Foreground switch full mode', 'sakurairo'),
'desc' => __('Check on by default, uncheck to switch to simple mode', 'sakurairo'),
'id' => 'full-mode',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Extra background switching(Heart-shaped icon)', 'sakurairo'),
'desc' => __('Check on by default', 'sakurairo'),
'id' => 'extra-bg',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Extra background switching(Star-shaped icon)', 'sakurairo'),
'desc' => __('Check on by default', 'sakurairo'),
'id' => 'extra-bg2',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Extra background switching(Square-shaped icon)', 'sakurairo'),
'desc' => __('Check on by default', 'sakurairo'),
'id' => 'extra-bg3',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Extra background switching(Lemon-shaped icon)', 'sakurairo'),
'desc' => __('Check on by default', 'sakurairo'),
'id' => 'extra-bg4',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Default Foreground Background', 'sakurairo'),
'desc' => __('Default foreground background, fill in URL', 'sakurairo'),
'id' => 'sakura_skin_bg1',
'std' => 'none',
'type' => 'text');
$options[] = array(
'name' => __('DIY(heart-shaped icon) foreground background', 'sakurairo'),
'desc' => __('DIY(heart-shaped icon) foreground background, fill in URL', 'sakurairo'),
'id' => 'sakura_skin_bg2',
'std' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/bg1.png',
'type' => 'text');
$options[] = array(
'name' => __('DIY(Star-shaped icon) foreground background', 'sakurairo'),
'desc' => __('DIY(Star-shaped icon) foreground background, fill in URL', 'sakurairo'),
'id' => 'sakura_skin_bg3',
'std' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/bg2.png',
'type' => 'text');
$options[] = array(
'name' => __('DIY(Square-shaped icon) foreground background', 'sakurairo'),
'desc' => __('DIY(Square-shaped icon) foreground background, fill in URL', 'sakurairo'),
'id' => 'sakura_skin_bg4',
'std' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/bg3.png',
'type' => 'text');
$options[] = array(
'name' => __('DIY(Lemon-shaped icon) foreground background', 'sakurairo'),
'desc' => __('DIY(Lemon-shaped icon) foreground background, fill in URL', 'sakurairo'),
'id' => 'sakura_skin_bg5',
'std' => 'https://cdn.jsdelivr.net/gh/mirai-mamori/web-img/img/bg4.png',
'type' => 'text');
$options[] = array(
'name' => __('Foreground transparency', 'sakurairo'),
'desc' => __('Fill in numbers between 0.1 and 1', 'sakurairo'),
'id' => 'homepagebgtmd',
'std' => '0.8',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Homepage animation', 'sakurairo'),
'desc' => __('Check open', 'sakurairo'),
'id' => 'homepage-ani',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Article title line animation', 'sakurairo'),
'desc' => __('Check open', 'sakurairo'),
'id' => 'title-line',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Article title animation', 'sakurairo'),
'desc' => __('Check open', 'sakurairo'),
'id' => 'title-ani',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Homepage animation Time', 'sakurairo'),
'desc' => __('Fill in Number', 'sakurairo'),
'id' => 'hp-ani-t',
'std' => '2',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Article title animation Time', 'sakurairo'),
'desc' => __('Fill in Number', 'sakurairo'),
'id' => 'title-ani-t',
'std' => '2',
'class' => 'mini',
'type' => 'text');
$options[] = array(
'name' => __('Close the front desk login entry', 'sakurairo'),
'desc' => __('Check off by default', 'sakurairo'),
'id' => 'user-avatar',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Darkmode', 'sakurairo'),
'desc' => __('Check open', 'sakurairo'),
'id' => 'darkmode',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Footer float music player', 'sakurairo'),
'desc' => __('Choose which platform you\'ll use.', 'sakurairo'),
'id' => 'aplayer_server',
'std' => "netease",
'type' => "select",
'options' => array(
'netease' => __('Netease Cloud Music (default)', 'sakurairo'),
'xiami' => __('Xiami Music', 'sakurairo'),
'kugou' => __('KuGou Music (may fail)', 'sakurairo'),
'baidu' => __('Baidu Music(Overseas server does not support)', 'sakurairo'),
'tencent' => __('QQ Music (may fail) ', 'sakurairo'),
'off' => __('Off', 'sakurairo'),
));
$options[] = array(
'name' => __('Song list ID', 'sakurairo'),
'desc' => __('Fill in the "song list" ID, eg: https://music.163.com/#/playlist?id=3124382377 The ID is 3124382377', 'sakurairo'),
'id' => 'aplayer_playlistid',
'std' => '3124382377',
'type' => 'text');
$options[] = array(
'name' => __('Netease Cloud Music cookie', 'sakurairo'),
'desc' => __('For Netease Cloud Music, fill in your vip account\'s cookies if you want to play special tracks.<b>If you don\'t know what does mean, left it blank.</b>', 'sakurairo'),
'id' => 'aplayer_cookie',
'std' => '',
'type' => 'textarea');
$options[] = array(
'name' => __('Pjax Refresh', 'sakurairo'),
'desc' => __('Check on, and the principle is the same as Ajax.', 'sakurairo'),
'id' => 'poi_pjax',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('NProgress progress bar', 'sakurairo'),
'desc' => __('Check on by default', 'sakurairo'),
'id' => 'nprogress_on',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('sidebar widget', 'sakurairo'),
'desc' => __('Default off, check on', 'sakurairo'),
'id' => 'sakura_widget',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('sidebar widget background image', 'sakurairo'),
'desc' => __('Sidebar widget background settings, fill in the URL', 'sakurairo'),
'id' => 'sakura_widget_bg',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('More JavaScript', 'sakurairo'),
'desc' => __('check on', 'sakurairo'),
'id' => 'addmorejs',
'std' => '0',