-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoptions.php
1984 lines (1677 loc) · 67.6 KB
/
options.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
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.
*/
function optionsframework_option_name() {
// Change this to use your theme slug
return 'QGG';
}
/**
* 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 'site-stytle-textdomain'
* with the actual text domain for your theme. Read more:
* http://codex.wordpress.org/Function_Reference/load_theme_textdomain
*/
function optionsframework_options() {
// Test data
$test_array = array(
'one' => __( 'One', 'site-stytle-textdomain' ),
'two' => __( 'Two', 'site-stytle-textdomain' ),
'three' => __( 'Three', 'site-stytle-textdomain' ),
'four' => __( 'Four', 'site-stytle-textdomain' ),
'five' => __( 'Five', 'site-stytle-textdomain' )
);
// Multicheck Array
$multicheck_array = array(
'one' => __( 'French Toast', 'site-stytle-textdomain' ),
'two' => __( 'Pancake', 'site-stytle-textdomain' ),
'three' => __( 'Omelette', 'site-stytle-textdomain' ),
'four' => __( 'Crepe', 'site-stytle-textdomain' ),
'five' => __( 'Waffle', 'site-stytle-textdomain' )
);
// Multicheck Defaults
$multicheck_defaults = array(
'one' => '1',
'five' => '1'
);
// Background Defaults
$background_defaults = array(
'color' => '',
'image' => '',
'repeat' => 'repeat',
'position' => 'top center',
'attachment'=>'scroll' );
// Typography Defaults
$typography_defaults = array(
'size' => '15px',
'face' => 'georgia',
'style' => 'bold',
'color' => '#bada55' );
// Typography Options
$typography_options = array(
'sizes' => array( '6','12','14','16','20' ),
'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),
'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),
'color' => false
);
// Pull all the categories into an array
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
// Pull all tags into an array
$options_tags = array();
$options_tags_obj = get_tags();
foreach ( $options_tags_obj as $tag ) {
$options_tags[$tag->term_id] = $tag->name;
}
// Pull all the pages into an array
$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;
}
// Pull all the linkcats into an array
$options_linkcats = array();
$options_linkcats_obj = get_terms('link_category');
foreach ( $options_linkcats_obj as $tag ) {
$options_linkcats[$tag->term_id] = $tag->name;
}
// Animate 动画效果
$animate_effect = array(
'bounce' => __( 'bounce', 'QGG' ),
'pulse' => __( 'pulse', 'QGG' ),
'rubberBand' => __( 'rubberBand', 'QGG' ),
'shake' => __( 'shake', 'QGG' ),
'swing' => __( 'swing', 'QGG' ),
'tada' => __( 'tada', 'QGG' ),
'wobble' => __( 'wobble', 'QGG' ),
'bounceIn' => __( 'bounceIn', 'QGG' ),
'bounceInDown' => __( 'bounceInDown', 'QGG' ),
'bounceInUp' => __( 'bounceInUp', 'QGG' ),
'bounceInLeft' => __( 'bounceInLeft', 'QGG' ),
'bounceInRight' => __( 'bounceInRight', 'QGG' ),
'fadeIn' => __( 'fadeIn', 'QGG' ),
'fadeInDown' => __( 'fadeInDown', 'QGG' ),
'fadeInUp' => __( 'fadeInUp', 'QGG' ),
'fadeInLeft' => __( 'fadeInLeft', 'QGG' ),
'fadeInRight' => __( 'fadeInRight', 'QGG' ),
'zoomIn' => __( 'zoomIn', 'QGG' ),
'zoomInDown' => __( 'zoomInDown', 'QGG' ),
'zoomInUp' => __( 'zoomInUp', 'QGG' ),
'zoomInLeft' => __( 'zoomInLeft', 'QGG' ),
'zoomInRight' => __( 'zoomInRight', 'QGG' ),
);
// Feature Article Lists
$feature_post = array(
'rand' => __( '随机文章', 'QGG' ),
'view' => __( '最多阅读', 'QGG' ),
'like' => __( '最多喜欢', 'QGG' ),
'comment' => __( '最多评论', 'QGG' ),
'modified' => __( '最新更新', 'QGG' )
);
// 微信安全模式
$wechat_encoding_mode = array(
'plaintext' => __( '明文模式', 'QGG' ),
'compatible' => __( '兼容模式', 'QGG' ),
'encryption' => __( '安全模式', 'QGG' )
);
// If using image radio buttons, define a directory path
$img_uri = get_template_directory_uri() . '/assets/img/';
$ads_desc = __('可添加任意广告联盟代码或自定义代码', 'QGG');
$ads_01 = __('<a href="https://zibuyu.life/" target="_blank"><img src="'.get_template_directory_uri().'/assets/img/ads-reset-01.png"></a>', 'QGG');
$ads_02 = __('<a href="https://zibuyu.life/" target="_blank"><img src="'.get_template_directory_uri().'/assets/img/ads-reset-02.png"></a>', 'QGG');
/**==================== 正式配置代码开始 ====================*/
$options = array();
$options[] = array(
'name' => __( '基本配置', 'QGG' ),
'type' => 'heading'
);
$options[] = array(
'name' => __('初始化', 'QGG'),
'desc' => __('开启,禁止 WordPress 生成缩略图 # 占空间且后期更改配置后可能造成很多图片 404 ,建议禁止', 'QGG'),
'id' => 'disable_wp_thumbnail',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __('整站样式', 'QGG'),
'desc' => __('开启,整站变灰', 'QGG'),
'id' => 'site_style_gray',
'type' => "checkbox",
'std' => false
);
$options[] = array(
'desc' => __('开启,导航固定:display: fixed;', 'QGG'),
'id' => 'nav_fixed_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('<b>内容宽度</b>:.container 类的 max-width 属性', 'QGG'),
'id' => 'site_style_width',
'type' => 'text',
'std' => 1366
);
$options[] = array(
'desc' => __('<b>圆角半径</b>:border-radius 属性', 'QGG'),
'id' => 'site_style_border-radius',
'type' => 'text',
'std' => 5
);
$options[] = array(
'desc' => __("<b>皮肤颜色</b>:color、background-color、border-color 等属性", 'QGG'),
'id' => "site_style_skin",
'type' => "colorradio",
'std' => "45B6F7",
'options' => array(
'45B6F7' => 1,
'FF5E52' => 2,
'2CDB87' => 3,
'00D6AC' => 4,
'16C0F8' => 5,
'EA84FF' => 6,
'FDAC5F' => 7,
'FD77B2' => 8,
'76BDFF' => 9,
'C38CFF' => 10,
'FF926F' => 11,
'8AC78F' => 12,
'C7C183' => 13,
'555555' => 14
)
);
$options[] = array(
'desc' => __('<b>代码高亮</b> # 选择一种代码高亮样式', 'QGG'),
'id' => "code_highlight_style",
'type' => "select",
'std' => "monokai-sublime",
'options' => array(
'monokai-sublime' => __('monokai-sublime', 'QGG'),
'github-dark' => __('github-dark', 'QGG'),
'github' => __('github', 'QGG'),
'mono-blue' => __('mono-blue', 'QGG'),
'monokai' => __('monokai', 'QGG'),
'railscasts' => __('railscasts', 'QGG'),
)
);
$options[] = array(
'name' => __('Gravatar 头像服务', 'QGG'),
'desc' => __('<b>头像获取方式</b>', 'QGG'),
'id' => 'gravatar_from',
'type' => "select",
'std' => "https://gravatar.wp-china-yes.net/avatar/",
'options' => array(
'https://www.gravatar.com/avatar/' => 'https://www.gravatar.com/avatar/',
'https://secure.gravatar.com/avatar/' => 'https://secure.gravatar.com/avatar/',
'https://gravatar.wp-china-yes.net/avatar/' => 'https://gravatar.wp-china-yes.net/avatar/',
'https://sdn.geekzu.org/avatar/' => 'https://sdn.geekzu.org/avatar/',
)
);
$options[] = array(
'desc' => __('<b>自定义 Gravatar 头像地址</b>', 'QGG'),
'id' => 'gravatar_from_custom',
'type' => "text",
'std' => "",
);
$options[] = array(
'name' => __('链接新窗口打开', 'QGG'),
'desc' => __('开启,网站中超链接点击后将在新窗口中打开', 'QGG'),
'id' => 'target_blank',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __('整站缩略图', 'QGG'),
'desc' => __('开启,首图作为缩略图 # 文章未设置特色图像时使用首图作为缩略图', 'QGG'),
'id' => 'thumbnail_postfirstimg_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,异步加载缩略图 # 使用 lazyload 实现懒加载,提升网页加载速度', 'QGG'),
'id' => 'thumbnail_async_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __('面包屑导航', 'QGG'),
'desc' => __('开启,在内容页上显示一个面包屑导航', 'QGG'),
'id' => 'breadcrumbs_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示文章标题而不是【正文】字样', 'QGG'),
'id' => 'breadcrumbs_title_on',
'type' => "checkbox",
'std' => false
);
$options[] = array(
'name' => __('文章内容首行缩进', 'QGG'),
'desc' => __('开启,段落缩进——前台文章段落首行缩进,后台编辑时无效', 'QGG'),
'id' => 'post_indent_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __('最新文章列表', 'QGG'),
'desc' => __('<b>模块标题</b> # 显示在模块上方的文字性标题内容', 'QGG'),
'id' => 'new_posts_excerpt_title',
'std' => __('最新发布', 'QGG'),
'type' => 'text'
);
$options[] = array(
'desc' => __('<b>右侧链接</b> # 标题右侧的超链接,可设置多个', 'QGG'),
'id' => 'new_posts_excerpt_title_more',
'std' => '<a href="https://zibuyu.life/">子不语 | 一个不学无术的伪程序员</a>',
'type' => 'textarea',
'settings' => array(
'rows' => 3
)
);
$options[] = array(
'desc' => __('<b>显示方式</b> # 是否显示图片', 'QGG'),
'id' => 'new_posts_excerpt_list_type',
'type' => "radio",
'std' => "thumbnail",
'options' => array(
'thumbnail' => __('图文模式(建议缩略图尺寸:220*150px)', 'QGG'),
'text' => __('文字模式 ', 'QGG'),
'thumbnail_if_has' => __('图文模式,无特色图时自动转换为文字模式 ', 'QGG'),
)
);
$options[] = array(
'name' => __('整站文章小部件控制', 'QGG'),
'desc' => __('开启,显示文章分类', 'QGG'),
'id' => 'post_tag_category_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示推荐图标', 'QGG'),
'id' => 'post_tag_sticky_on',
'type' => "checkbox",
'std' => false
);
$options[] = array(
'desc' => __('开启,显示NEW图标', 'QGG'),
'id' => 'post_tag_new_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('<b>NEW 时间限制</b> # 默认为 72 小时', 'QGG'),
'id' => 'post_new_limit_time',
'type' => 'text',
'std' => 72
);
$options[] = array(
'desc' => __('开启,显示编辑时间', 'QGG'),
'id' => 'post_meta_date_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示作者姓名', 'QGG'),
'id' => 'post_meta_author_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,添加作者链接', 'QGG'),
'id' => 'post_meta_author_link_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示阅读数量', 'QGG'),
'id' => 'post_meta_view_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示喜欢数量', 'QGG'),
'id' => 'post_meta_like_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,显示评论数量', 'QGG'),
'id' => 'post_meta_comment_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __('整站评论系统', 'QGG'),
'desc' => __('关闭,关闭整站评论', 'QGG'),
'id' => 'comment_off',
'type' => "checkbox",
'std' => false
);
$options[] = array(
'desc' => __('<b>评论标题</b>', 'QGG'),
'id' => 'comment_title',
'type' => 'text',
'std' =>'评论'
);
$options[] = array(
'desc' => __('<b>提交按钮</b> # 替换文字', 'QGG'),
'id' => 'comment_submit_text',
'type' => 'text',
'std' => '提交评论',
);
$options[] = array(
'desc' => __('<b>提示字符</b> # 你的评论可以一针见血', 'QGG'),
'id' => 'comment_placeholder_text',
'type' => 'text',
'std' => '你的评论可以一针见血'
);
$options[] = array(
'desc' => __('<b>背景图</b> # 评论框内的底图', 'QGG'),
'id' => 'comment_background_img',
'type' => 'upload',
'std' => $img_uri.'comment-bgimg.png'
);
$options[] = array(
'desc' => __('开启,Emoji 表情', 'QGG'),
'id' => 'comment_emoji_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('开启,输入 QQ 自动获取信息', 'QGG'),
'id' => 'comment_getqqinfo_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'name' => __( '整站页眉', 'QGG' ),
'type' => 'heading'
);
$options[] = array(
'name' => __('顶部导航参数设置', 'QGG'),
'desc' => __('开启,关闭TopBar——关闭页面顶部TopBar部分', 'QGG'),
'id' => 'topbar_off',
'type' => "checkbox",
'std' => false
);
$options[] = array(
'desc' => __('开启,滚动公告', 'QGG'),
'id' => 'announcement_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('<b>滚动公告内容</b> # 每行一条,回车换行即可。不明白?<a href="http://zibuyu.life">点击这里</a> 进行留言。', 'QGG'),
'id' => 'announcement_list',
'type' => 'textarea',
'std' => '<a href="https://zibuyu.life">子不语 | 一个不学无术的伪程序员</a>',
'settings' => array(
'rows' => 3
)
);
$options[] = array(
'desc' => __('<b>站点Logo</b> # 建议尺寸:140*32px 格式:PNG', 'QGG'),
'id' => 'site_logo_src',
'type' => 'upload',
'std' => $img_uri.'site-logo.png'
);
$options[] = array(
'desc' => __('<b>品牌文字</b> # 换行填写两句文字(建议 4 字内)', 'QGG'),
'id' => 'brand_text',
'type' => 'textarea',
'std' => "记录成长\n分享快乐",
'settings' => array(
'rows' => 2
)
);
$options[] = array(
'desc' => __('<b>彩色条带</b> # 导航底部的装饰性图片', 'QGG'),
'id' => 'color_bar',
'type' => 'upload',
'std' => $img_uri.'colorful-bar.gif'
);
$options[] = array(
'name' => __('首页 SEO 设置',' QGG'),
'desc' => __('<b>站点标题</b> # 为空则采用后台【设置/常规】中的“站点标题 + 副标题”的形式',' QGG'),
'id' => 'site_title',
'std' => '子不语 | 一个不学无术的伪程序员',
'type' => 'textarea',
'settings' => array(
'rows' => 2
)
);
$options[] = array(
'desc' => __('<b>关键字</b> # 建议个数在5-10之间,用英文逗号隔开', 'QGG'),
'id' => 'site_keywords',
'std' => '网站建设,WordPress,服务器,运维,程序员,Blog,博客,子不语,蝈蝈',
'type' => 'textarea',
'settings' => array(
'rows' => 2
)
);
$options[] = array(
'desc' => __('<b>描述</b> # 建议字数在30-70之间', 'QGG'),
'id' => 'site_description',
'std' => '这个网站很棒棒哦~~~',
'type' => 'textarea',
'settings' => array(
'rows' => 3
)
);
$options[] = array(
'name' => __( '整站页脚', 'QGG' ),
'type' => 'heading'
);
$options[] = array(
'name' => __('友情链接', 'QGG'),
'desc' => __('开启,页脚友情链接', 'QGG'),
'id' => 'friendly_links_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('<b>链接分类</b> # 选择一个链接分类', 'QGG'),
'id' => 'friendly_links_cat',
'type' => 'select',
'std' => '',
'options' => $options_linkcats
);
$options[] = array(
'name' => __('自定义内容', 'QGG'),
'desc' => __('<b>自定义内容</b> # 友情链接下方,版权信息上方', 'QGG'),
'id' => 'footer_custom_content',
'type' => 'textarea',
'std' => '',
'settings' => array(
'rows' => 5
)
);
$options[] = array(
'name' => __('版权所有', 'QGG'),
'desc' => __('<b>ICP 备案号</b> >>> <a target="_blank" href="https://beian.miit.gov.cn/">官网地址</a>', 'QGG'),
'id' => 'site_beian_icp',
'std' => "",
'type' => 'text'
);
$options[] = array(
'desc' => __('<b>公网安备号</b> >>> <a target="_blank" href="http://www.beian.gov.cn/">官网地址</a>', 'QGG'),
'id' => 'site_beian_gov',
'std' => "",
'type' => 'text'
);
$options[] = array(
'desc' => __('<b>站点地图</b> # 选择【站点地图】页面模板', 'QGG'),
'id' => 'sitemap_html_page',
'type' => 'select',
'std' => '',
'options' => $options_pages
);
$options[] = array(
'desc' => __('<b>支持作者</b> # 显示技术支持信息', 'QGG'),
'id' => 'site_tech_support',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('<b>自定义链接</b> # 版权旁的其他超链接内容', 'QGG'),
'id' => 'footer_custom_link',
'type' => 'textarea',
'std' => '',
'settings' => array(
'rows' => 5
)
);
$options[] = array(
'name' => __('运行信息', 'QGG'),
'desc' => __('开启,页面加载用时', 'QGG'),
'id' => 'page_loading_time_on',
'type' => "checkbox",
'std' => true
);
$options[] = array(
'desc' => __('<b>建站时间</b> # 注意格式:2017-04-01 00:00:00', 'QGG'),
'id' => 'site_building_time',
'std' => "2017-04-01 00:00:00",
'type' => 'text'
);
$options[] = array(
'name' => __( '全屏轮播', 'QGG' ),
'type' => 'heading'
);
// 首页全屏轮播图
$options[] = array(
'name' => __('全屏轮播图', 'QGG'),
'desc' => __('开启,显示一个全屏走马灯', 'QGG'),
'id' => 'carousel_full_screen_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('开启,手机端不显示', 'QGG'),
'id' => 'carousel_full_screen_m_off',
'type' => 'checkbox',
'std' => true
);
for ($i=1; $i <= 3; $i++) {
$options[] = array(
'desc' => __('开启,第<i>'.$i.'</i>张轮播内容', 'QGG'),
'id' => 'carousel_full_screen_on-'.$i,
'type' => 'checkbox',
'std' => true
);
// 悬浮图
$options[] = array(
'desc' => __('<b>背景图片</b> # 建议尺寸:1920*420px', 'QGG'),
'id' => 'carousel_full_screen_bgimg-'.$i,
'type' => 'upload',
'std' => $img_uri.'carousel-bgImg.png'
);
$options[] = array(
'desc' => __('开启,右图左文', 'QGG'),
'id' => 'carousel_full_screen_img_right-'.$i,
'type' => 'checkbox',
'std' => false
);
$options[] = array(
'desc' => __('<b>悬浮图片</b> # 建议尺寸:240*340px', 'QGG'),
'id' => 'carousel_full_screen_img-'.$i,
'type' => 'upload',
'std' => $img_uri.'carousel-img.png'
);
$options[] = array(
'desc' => __('<b>悬浮效果</b>:swiper-animate-effect,详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_img_animate_effect-'.$i,
'type' => 'select',
'std' => 'bounceInLeft',
'options' => $animate_effect
);
$options[] = array(
'desc' => __('<b>悬浮图片持续时间</b>:swiper-animate-duration,单位:s。详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_img_animate_duration-'.$i,
'type' => 'text',
'std' => '0.5'
);
$options[] = array(
'desc' => __('<b>悬浮图片延迟时间</b>:swiper-animate-delay,单位:s。详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_img_animate_delay-'.$i,
'type' => 'text',
'std' => '0.3'
);
// 文案
$options[] = array(
'desc' => __('<b>文案标题</b>','QGG'),
'id' => 'carousel_full_screen_title-'.$i,
'type' => 'text',
'std' => '子不语 | 一个不学无术的伪程序员'
);
$options[] = array(
'desc' => __('<b>描述信息</b> # 建议 200 字以内','QGG'),
'id' => 'carousel_full_screen_desc-'.$i,
'type' => 'textarea',
'std' => '分享网站建设中遇到的WordPress、Linux,Apache,Nginx,PHP,HTML,CSS等的问题及解决方案;分享Windows操作系统及其周边的一些经验知识;分享互联网使用过程中遇到的一些问题及其处理技巧;分享一些自己在读书过程中的心得体会;分享一些自己觉得有意义的音视频内容 ... ...',
'settings' => array(
'rows' => 3
)
);
// 按钮1
$options[] = array(
'desc' => __('<b>左按钮标题</b> # 建议4字内', 'QGG'),
'id' => 'carousel_full_screen_lbtn-'.$i,
'type' => 'text',
'std' => '快速直达'
);
$options[] = array(
'desc' => __('<b>左按钮链接</b>', 'QGG'),
'id' => 'carousel_full_screen_lbtn_href-'.$i,
'type' => 'text',
'std' => 'https://zibuyu.life'
);
// 按钮2
$options[] = array(
'desc' => __('<b>右按钮标题</b> # 建议4字内', 'QGG'),
'id' => 'carousel_full_screen_rbtn-'.$i,
'type' => 'text',
'std' => '了解详情'
);
$options[] = array(
'desc' => __('<b>右按钮链接</b>', 'QGG'),
'id' => 'carousel_full_screen_rbtn_href-'.$i,
'type' => 'text',
'std' => 'https://zibuyu.life'
);
$options[] = array(
'desc' => __('<b>文案转场效果</b>:swiper-animate-effect,详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_txt_animate_effect-'.$i,
'type' => 'select',
'std' => 'bounceInRight',
'options' => $animate_effect
);
$options[] = array(
'desc' => __('<b>文案转场持续时间</b>:swiper-animate-duration,单位:s。详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_txt_animate_duration-'.$i,
'type' => 'text',
'std' => '0.5'
);
$options[] = array(
'desc' => __('<b>文案转场延迟时间</b>:swiper-animate-delay,单位:s。详见:<a href="https://www.swiper.com.cn/usage/animate/index.html">Swiper Animate</a>','QGG'),
'id' => 'carousel_full_screen_txt_animate_delay-'.$i,
'type' => 'text',
'std' => '0.3'
);
}
$options[] = array(
'name' => __( '三栏推广', 'QGG' ),
'type' => 'heading'
);
// 全站底部三栏推广区修改
$options[] = array(
'name' => __('全站底部推广模块', 'QGG'),
'desc' => __('开启,底部三栏推广模块', 'QGG'),
'id' => 'footer_brand_lmr_on',
'type' => 'checkbox',
'std' => true
);
// 左侧区域自定义
$options[] = array(
'desc' => __('<b>推广图标</b> # 建议尺寸180x42px', 'QGG'),
'id' => 'footer_brand_lmr_logo',
'type' => 'upload',
'std' => $img_uri.'site-logo-pure.png'
);
$options[] = array(
'desc' => __('<b>推广文本</b> # 建议100字内,显示在模块左侧', 'QGG'),
'id' => 'footer_brand_lmr_text',
'type' => 'textarea',
'std' => '子不语博客域名(zibuyu.life)申请于2016年4曰1日愚人节,博客始建于2017年3月14日,博客主要分享网站建设中遇到的问题及解决方案、自己在读书过程中的心得体会、一些自己觉得有意义的音视频内容,记录些生活中的琐事,希望博客能督促怠惰的自己不断学习,不断进步。',
'settings' => array(
'rows' => 3
)
);
// 中间区域自定义
for ($i=1; $i <= 3; $i++){
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>二维码 ID</b> # 二维码图片下方的 ID', 'QGG'),
'id' => 'footer_brand_lmr_qr_id_'.$i,
'type' => 'text',
'std' => '子不语'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>二维码描述</b> # 二维码下方的简单描述', 'QGG'),
'id' => 'footer_brand_lmr_qr_desc_'.$i,
'type' => 'text',
'std' => '微信公众号'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>二维码图片</b>', 'QGG'),
'id' => 'footer_brand_lmr_qr_img_'.$i,
'type' => 'upload',
'std' => $img_uri.'qrcode.png'
);
}
// 右侧区域自定义
$options[] = array(
'desc' => __('<b>右侧超链接标题</b>', 'QGG'),
'id' => 'footer_brand_lmr_title',
'std' => '精彩直达',
'type' => 'text'
);
for ($j=1; $j <= 9; $j++) {
$options[] = array(
'desc' => __('<b><i>'.$j.'</i>按钮文本</b>', 'QGG'),
'id' => 'footer_brand_lmr_link_name_'.$j,
'type' => 'text',
'std' => '子不语'
);
$options[] = array(
'desc' => __('<b><i>'.$j.'</i>按钮链接</b>', 'QGG').$j,
'id' => 'footer_brand_lmr_link_href_'.$j,
'type' => 'text',
'std' => 'https://zibuyu.life/'
);
}
$options[] = array(
'name' => __( '首页模块', 'QGG' ),
'type' => 'heading'
);
// 首页推荐盒子
$options[] = array(
'name' => __('首页专题盒子模块', 'QGG'),
'desc' => __('开启,专题盒子', 'QGG'),
'id' => 'topic_card_box_on',
'type' => 'checkbox',
'std' => true
);
for ($i=1; $i <= 4; $i++) {
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>背景图片</b> # 建议尺寸:480pxx160px', 'QGG'),
'id' => 'topic_card_box_img-'.$i,
'type' => 'upload',
'std' => $img_uri.'topic.png'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>图上标题</b> # 建议 5 字以内','QGG'),
'id' => 'topic_card_box_title-'.$i,
'type' => 'text',
'std' => '子不语'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>图下主描述</b> # 建议 15 字以内','QGG'),
'id' => 'topic_card_box_desc01-'.$i,
'type' => 'text',
'std' => '一个不学无术的伪程序员'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>图下副描述</b> # 建议 10 字以内','QGG'),
'id' => 'topic_card_box_desc02-'.$i,
'type' => 'text',
'std' => '记录成长 | 分享快乐'
);
$options[] = array(
'desc' => __('<b><i>'.$i.'</i>跳转链接</b>','QGG'),
'id' => 'topic_card_box_link-'.$i,
'type' => 'text',
'std' => 'https://zibuyu.life'
);
}
// 首页图片盒子
$options[] = array(
'name' => __('首页图片盒子模块', 'QGG'),
'desc' => __('开启,图片盒子', 'QGG'),
'id' => 'img_box_posts_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('开启,文章标题 # 鼠标悬浮后显示', 'QGG'),
'id' => 'img_box_posts_title_on',
'type' => 'checkbox',
'std' => true
);
// 最新文章摘列表
$options[] = array(
'name' => __('最新文章列表模块', 'QGG'),
'desc' => __('开启,最新文章列表', 'QGG'),
'id' => 'new_posts_excerpt_on',
'type' => 'checkbox',
'std' => true
);
// 双栏特性文章列表
$options[] = array(
'name' => __('双栏特性文章列表', 'QGG'),
'desc' => __('开启,双栏特性文章(热门、热评、随机、点赞…)', 'QGG'),
'id' => 'posts_list_double_s1_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('<b>左侧列表标题</b>', 'QGG'),
'id' => 'posts_list_double_s1_title_left',
'type' => 'text',
'std' => '随机推荐'
);
$options[] = array(
'desc' => __('<b>左侧特性</b> # 热门、热评、随机、点赞…', 'QGG'),
'id' => 'posts_list_double_s1_feature_left',
'type' => 'select',
'std' => 'rand',
'options' => $feature_post
);
$options[] = array(
'desc' => __('<b>右侧列表标题</b>', 'QGG'),
'id' => 'posts_list_double_s1_title_right',
'type' => 'text',
'std' => '最多评论'
);
$options[] = array(
'desc' => __('<b>右侧特性</b> # 热门、热评、随机、点赞…', 'QGG'),
'id' => 'posts_list_double_s1_feature_right',
'type' => 'select',
'std' => 'comment',
'options' => $feature_post
);
// 双栏分类文章列表
$options[] = array(
'name' => __('双栏分类文章列表</b>', 'QGG'),
'desc' => __('开启,双栏分类文章列表', 'QGG'),
'id' => 'posts_list_double_s2_on',
'type' => 'checkbox',
'std' => true
);
$options[] = array(
'desc' => __('<b>左侧列表标题</b>', 'QGG'),
'id' => 'posts_list_double_s2_title_left',
'type' => 'text',
'std' => '分类推荐'
);
$options[] = array(
'desc' => __('<b>左侧文章分类</b>', 'QGG'),
'id' => 'posts_list_double_s2_catId_left',
'type' => 'select',
'std' => '',
'options' => $options_categories
);