/
customizer.php
5868 lines (5229 loc) · 248 KB
/
customizer.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 //テーマカスタマイザーに関係する関数
include 'customizer-sanitize.php';//カスタマイザーサニタイズ関係の関数
//色を定数にする
define("LINK_COLOR", "");
define("LINK_HOVER_COLOR", "");
define("HEADER_OUTER_BACKGROUND_COLOR", "");
define("HEADER_INNER_BACKGROUND_COLOR", "");
define("SITE_TITLE_COLOR", "");
define("SITE_DESCRIPTION_COLOR", "");
define("MOBILE_BACKGROUND_COLOR", "");
define("NAVI_COLOR", "");
define("NAVI_LINK_COLOR", "");
define("NAVI_LINK_HOVER_COLOR", "");
define("MENU_BUTTON_COLOR", "");
define("MENU_BUTTON_BACKGROUND_COLOR", "");
define("GO_TO_TOP_BUTTON_COLOR", "");
define("GO_TO_TOP_BUTTON_BACKGROUND_COLOR", "");
define("FOOTER_COLOR", "");
//文字サイズ
define("ARTICLE_FONT_SIZE", "16");
if(class_exists('WP_Customize_Control')):
class SP_Customizer_Textarea_Control extends WP_Customize_Control {
public $type = 'textarea';
public function render_content() {
?>
<label>
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
<textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
</label>
<span class="description customize-control-description"><?php echo $this->description; ?></span>
<?php
}
}
endif;
add_action( 'customize_register', 'theme_customize_register' );
function theme_customize_register($wp_customize) {
/////////////////////////////
//色設定項目の書き換え
/////////////////////////////
$wp_customize->add_section( 'colors', array(
'title' => __('色', 'simplicity2'),
'description' => is_tips_visible() ? __('テーマで使用している色を変更します。', 'simplicity2') : '',
'priority' => 20,
));
//リンク色
$wp_customize->add_setting( 'link_color', array(
'default' => LINK_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
'label' => __( 'リンク色', 'simplicity2' ),
'description' => is_tips_visible() ? __('通常のリンク色です。(デフォルト色:#2098a8)', 'simplicity2') : '',
'section' => 'colors',
'settings' => 'link_color',
'priority' => 15,
) ) );
//リンク色ホバー
$wp_customize->add_setting( 'link_hover_color', array(
'default' => LINK_HOVER_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_hover_color', array(
'label' => __( 'リンクホバー色', 'simplicity2' ),
'description' => is_tips_visible() ? __('マウスカーソルが乗ったときのリンク色です。(デフォルト色:#cc0033)', 'simplicity2') : '',
'section' => 'colors',
'settings' => 'link_hover_color',
'priority' => 20,
) ) );
//ヘッダー外側色
$wp_customize->add_setting( 'header_outer_background_color', array(
'default' => HEADER_OUTER_BACKGROUND_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_outer_background_color', array(
'label' => __( 'ヘッダー外側背景色', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面幅いっぱいに広がるヘッダーの背景色です。(デフォルト色:transparent)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'header_outer_background_color',
'priority' => 25,
) ) );
//ヘッダー内側色
$wp_customize->add_setting( 'header_inner_background_color', array(
'default' => HEADER_INNER_BACKGROUND_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_inner_background_color', array(
'label' => __( 'ヘッダー内側背景色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'ヘッダー内側の背景色です。(デフォルト色:transparent)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'header_inner_background_color',
'priority' => 26,
) ) );
//サイトタイトル色
$wp_customize->add_setting( 'site_title_color', array(
'default' => SITE_TITLE_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'site_title_color', array(
'label' => __( 'サイトタイトル色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイトタイトルの文字色です。(デフォルト色:#222222)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'site_title_color',
'priority' => 30,
) ) );
//サイト概要色
$wp_customize->add_setting( 'site_description_color', array(
'default' => SITE_DESCRIPTION_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'site_description_color', array(
'label' => __( 'サイト概要色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイトキャッチフレーズの文字色です。(デフォルト色:#777777)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'site_description_color',
'priority' => 40,
) ) );
//モバイル時ヘッダー色
$wp_customize->add_setting( 'mobile_background_color', array(
'default' => MOBILE_BACKGROUND_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mobile_background_color', array(
'label' => __( 'モバイル時ヘッダー背景色', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面幅いっぱいに広がるモバイルヘッダーの背景色です。(デフォルト色:transparent)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'mobile_background_color',
'priority' => 50,
) ) );
//モバイルサイトタイトル色
$wp_customize->add_setting( 'mobile_site_title_color', array(
'default' => SITE_TITLE_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mobile_site_title_color', array(
'label' => __( 'モバイルサイトタイトル色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'モバイル時のサイトタイトルの文字色です。(デフォルト色:#222222)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'mobile_site_title_color',
'priority' => 60,
) ) );
//サイト概要色
$wp_customize->add_setting( 'mobile_site_description_color', array(
'default' => SITE_DESCRIPTION_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'mobile_site_description_color', array(
'label' => __( 'モバイルサイト概要色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'モバイル時のサイトキャッチフレーズの文字色です。(デフォルト色:#777777)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'mobile_site_description_color',
'priority' => 70,
) ) );
//グローバルナビ色
$wp_customize->add_setting( 'navi_color', array(
'default' => NAVI_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navi_color', array(
'label' => __( 'グローバルナビ色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'グローバルナビ(メインメニュー)の背景色です。(デフォルト色:#f7f7f7)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'navi_color',
'priority' => 80,
) ) );
//グローバルナビリンク色
$wp_customize->add_setting( 'navi_link_color', array(
'default' => NAVI_LINK_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navi_link_color', array(
'label' => __( 'グローバルナビリンク色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'グローバルナビリンクの文字色です。(デフォルト色:#111111)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'navi_link_color',
'priority' => 90,
) ) );
//グローバルナビリンク色ホバー
$wp_customize->add_setting( 'navi_link_hover_color', array(
'default' => NAVI_LINK_HOVER_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navi_link_hover_color', array(
'label' => __( 'グローバルナビリンクホバー色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'マウスカーソルが乗ったときのメニュー項目の背景色です。(デフォルト色:#dddddd)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'navi_link_hover_color',
'priority' => 100,
) ) );
//メニューボタン色
$wp_customize->add_setting( 'menu_button_color', array(
'default' => MENU_BUTTON_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_button_color', array(
'label' => __( 'メニューボタン色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'モバイル用メニュー表示ボタンのアイコン色です。(デフォルト色:#333333)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'menu_button_color',
'priority' => 102,
) ) );
//メニューボタン背景色
$wp_customize->add_setting( 'menu_button_background_color', array(
'default' => MENU_BUTTON_BACKGROUND_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_button_background_color', array(
'label' => __( 'メニューボタン背景色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'モバイル用メニュー表示ボタンの背景色です。(デフォルト色:transparent)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'menu_button_background_color',
'priority' => 104,
) ) );
//トップへ戻るボタン色
$wp_customize->add_setting( 'go_to_top_button_color', array(
'default' => GO_TO_TOP_BUTTON_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'go_to_top_button_color', array(
'label' => __( 'トップへ戻るボタン色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'トップに戻るボタンのアイコン色です。(デフォルト色:#ffffff)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'go_to_top_button_color',
'priority' => 110,
) ) );
//トップへ戻るボタン背景色
$wp_customize->add_setting( 'go_to_top_button_background_color', array(
'default' => GO_TO_TOP_BUTTON_BACKGROUND_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'go_to_top_button_background_color', array(
'label' => __( 'トップへ戻るボタン背景色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'トップに戻るボタンの背景色です。(デフォルト色:#aaaaaa)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'go_to_top_button_background_color',
'priority' => 112,
) ) );
//フッター色
$wp_customize->add_setting( 'footer_color', array(
'default' => FOOTER_COLOR,
'sanitize_callback' => 'sanitize_text',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_color', array(
'label' => __( 'フッター色', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'フッター部分の背景色です。(デフォルト色:#555555)', 'simplicity2' ) : '',
'section' => 'colors',
'settings' => 'footer_color',
'priority' => 120,
) ) );
/////////////////////////////
//ヘッダー設定項目の書き換え
/////////////////////////////
$wp_customize->add_section( 'header_image', array(
'title' => __( 'ヘッダー', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'ヘッダーで使用する画像や、ロゴ、グローバルナビの幅に関する設定です。', 'simplicity2' ) : '',
'priority' => 30,
));
//ヘッダーの高さ
$wp_customize->add_setting('header_height', array(
'default' => '100',
'sanitize_callback' => 'sanitize_number',
));
$wp_customize->add_control( 'header_height', array(
'settings' => 'header_height',
'label' => __( 'ヘッダーの高さpx(デフォルト:100)', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面トップからグローバルメニューまでの高さです。(※ヘッダー画像設定をする前に高さの設定推奨。変更した場合はカスタマイズ画面を再読み込みしてください)', 'simplicity2' ) : '',
'section' => 'header_image',
'type' => 'number',
'priority' => 20,
));
//ロゴ画像
$wp_customize->add_setting( 'header_logo_url', array(
'sanitize_callback' => 'sanitize_file_url',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'header_logo_url', array(
'settings' => 'header_logo_url',
'label' => __( 'ロゴ画像', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'タイトルテキストの代わりとなるロゴ設定します。(※表示させるには「ロゴを画像にする」を有効にする必要あり)', 'simplicity2' ) : '',
'section' => 'header_image',
'priority' => 30,
) ) );
//ロゴを画像にする
$wp_customize->add_setting('header_logo_enable', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'header_logo_enable', array(
'settings' => 'header_logo_enable',
'label' => __( 'ロゴを画像にする', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'タイトルロゴを画像にするか。', 'simplicity2' ) : '',
'section' => 'header_image',
'type' => 'checkbox',
'priority' => 40,
));
//ヘッダー外側背景画像
$wp_customize->add_setting( 'header_outer_background_image', array(
'sanitize_callback' => 'sanitize_file_url',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'header_outer_background_image', array(
'settings' => 'header_outer_background_image',
'label' => __( 'ヘッダー外側背景画像', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面幅いっぱいに広がるヘッダー画像を設定します。(※画像の高さは高めに設定しておいてください)<br><a href="https://wp-simplicity.com/how-to-set-big-header-image/" target="_blank">ヘッダー画像の設定方法</a>', 'simplicity2' ) : '',
'section' => 'header_image',
'priority' => 50,
) ) );
//グローバルナビ横幅いっぱいにする
$wp_customize->add_setting('layout_option_navi_wide', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'layout_option_navi_wide', array(
'settings' => 'layout_option_navi_wide',
'label' => __( 'グローバルナビを横幅いっぱいにする', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'グローバルナビを画面幅いっぱいに広げて「ヘッダー外側背景画像」に合わせるか。(※「色→グローバルナビ色」の設定も併せて行う必要があるかもしれません)<br><a href="https://wp-simplicity.com/how-to-set-big-header-image/" target="_blank">ヘッダー画像の設定方法設定方法</a>', 'simplicity2' ) : '',
'section' => 'header_image',
'type' => 'checkbox',
'priority' => 55,
));
//ヘッダーの高さ
$wp_customize->add_setting('header_height_mobile', array(
'default' => '0',
'sanitize_callback' => 'sanitize_number',
));
$wp_customize->add_control( 'header_height_mobile', array(
'settings' => 'header_height_mobile',
'label' => __( 'モバイルヘッダーの高さpx(デフォルト:0)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'モバイルでの画面トップからグローバルメニューまでの高さです。(※0にするとデフォルト設定になります)', 'simplicity2' ) : '',
'section' => 'header_image',
'type' => 'number',
'priority' => 57,
));
//モバイルヘッダー背景画像
$wp_customize->add_setting( 'mobile_header_background_image', array(
'sanitize_callback' => 'sanitize_file_url',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'mobile_header_background_image', array(
'settings' => 'mobile_header_background_image',
'label' => __( 'モバイルヘッダー背景画像', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面幅いっぱいに広がるモバイルヘッダー画像を設定します。(※画像の高さは高めに設定しておいてください)<a href="https://wp-simplicity.com/how-to-set-big-header-image/" target="_blank" class="example-setting">設定例</a>
', 'simplicity2' ) : '',
'section' => 'header_image',
'priority' => 60,
) ) );
/////////////////////////////
//スキン設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'skin_section', array(
'title' => __( 'スキン', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'Simplicityの外観を手軽に変更します。詳細は、<a href="https://wp-simplicity.com/skin/" target="_blank" class="example-setting">スキンの使い方</a>を参照してください。<br>パーツスキンに関しては<a href="https://wp-simplicity.com/skin-parts/" target="_blank">パーツスキンの使い方</a>を参照してください。', 'simplicity2' ) : '',
'priority' => 88,
));
//スキンの種類
$wp_customize->add_setting('skin_file', array(
'default' => null,//デフォルト値
'sanitize_callback' => 'sanitize_text',
));
$skins = get_skin_files();//スキンファイル情報の取得
$radio_items = array(
'' => __( '選択しない(デフォルト)' , 'simplicity2' ),//デフォルト値
);
foreach ($skins as $skin) {
$radio_items += array($skin['path'] => $skin['name']);
}
$wp_customize->add_control( 'skin_file', array(
'settings' => 'skin_file',
'label' => __( 'スキン選択', 'simplicity2' ),
'description' => is_tips_visible() ? __( '手軽にデザインを変更することができます。[P]マークがついているものは、フォルダ内のCSSファイルを結合して適用表示するパーツスキンです。※スキンで設定されたスタイルは親テーマ・子テーマで設定されたものより優先されます。', 'simplicity2' ) : '',
'section' => 'skin_section',
'type' => 'radio',
'choices' => $radio_items,
'priority' => 10, //優先度(並び順)
));
/////////////////////////////
//レイアウト(全体)設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'layout_section', array(
'title' => __( 'レイアウト(全体・リスト)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイト全体や一覧リストページのレイアウトに関する設定です。', 'simplicity2' ) : '',
'priority' => 89,
));
//サイトフォント
$wp_customize->add_setting('site_font', array(
'default' => 'default',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'site_font', array(
'settings' => 'site_font',
'label' => __( 'サイトフォント', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイト全体(bodyタグ)に適用されるフォントを設定します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'select',
'choices' => array(
'default' => __( 'デフォルト', 'simplicity2' ),
'Noto Sans JP' => __( 'Noto Sans JP(源ノ角ゴシック)', 'simplicity2' ),
'Noto Sans Japanese' => __( 'Noto Sans Japanese', 'simplicity2' ),
'Mplus 1p' => __( 'Mplus 1p', 'simplicity2' ),
'Rounded Mplus 1c' => __( 'Rounded Mplus 1c', 'simplicity2' ),
'Hannari' => __( 'Hannari(はんなり明朝)', 'simplicity2' ),
'Kokoro' => __( 'Kokoro(こころ明朝)', 'simplicity2' ),
'Sawarabi Gothic' => __( 'Sawarabi Gothic(さわらびゴシック)', 'simplicity2' ),
'Sawarabi Mincho' => __( 'Sawarabi Mincho(さわらび明朝)', 'simplicity2' ),
// 'Nikukyu' => __( 'Nikukyu(ニクキュウ)', 'simplicity2' ),
// 'Nico Moji' => __( 'Nico Moji(ニコモジ)', 'simplicity2' ),
),
'priority' => 0.8,
));
//完全レスポンシブデザインにする
$wp_customize->add_setting('responsive_enable', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'responsive_enable', array(
'settings' => 'responsive_enable',
'label' => __( '完全レスポンシブ表示を有効', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'パソコンとモバイルでシームレスな完全なレスポンシブデザイン表示になります。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 1,
));
if ( !is_responsive_enable() ):
//PCでサイドバーをレスポンシブ表示(※完全レスポンシブがオフの時のみに有効な設定)
$wp_customize->add_setting('responsive_pc_sidebar_enable', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'responsive_pc_sidebar_enable', array(
'settings' => 'responsive_pc_sidebar_enable',
'label' => __( 'PCでサイドバーをレスポンシブ表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'PC表示時にサイドバーをレスポンシブ表示するか。オフにするとレスポンシブ表示されません。(※完全レスポンシブ機能がオフの時のみ有効な設定)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 5,
));
endif;
//タイトルの中央寄せ
$wp_customize->add_setting('title_center', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'title_center', array(
'settings' => 'title_center',
'label' => __( 'サイトタイトルの中央寄せ', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイトのタイトルをヘッダーの中央にするか。(※トップのフォローボタンは表示されなくなります)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 10
));
//グローバルナビを表示
$wp_customize->add_setting('navi_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'navi_visible', array(
'settings' => 'navi_visible',
'label' => __( 'グローバルナビを表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'グローバルナビ(メインメニュー)を表示させたくないときはオフにしてください。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 20
));
//リストスタイル
$wp_customize->add_setting('list_style', array(
'default' => 'cards',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'list_style', array(
'settings' => 'list_style',
'label' => __( '一覧リストのスタイル', 'simplicity2' ),
'description' => is_tips_visible() ? __( '一覧(インデックス)ページの表示スタイル設定。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'radio',
'choices' => array(
'cards' => __( 'エントリーカード(デフォルト)', 'simplicity2' ),
'large_cards' => __( '大きなエントリーカード', 'simplicity2' ),
'large_card_just_for_first' => __( '最初だけ大きなエントリーカード', 'simplicity2' ),
'bodies' => __( '本文表示', 'simplicity2' ),
'body_just_for_first' => __( '最初だけ本文表示', 'simplicity2' ),
'bodies' => __( '本文表示', 'simplicity2' ),
'large_thumb' => __( 'サムネイル大', 'simplicity2' ),
'tile_thumb_2columns' => __( 'タイル2列', 'simplicity2' ),
'tile_thumb_3columns' => __( 'タイル3列', 'simplicity2' ),
'tile_thumb_2columns_raw' => __( 'タイル2列 画像縦横比保存(要再生成)', 'simplicity2' ),
'tile_thumb_3columns_raw' => __( 'タイル3列 画像縦横比保存(要再生成)', 'simplicity2' ),
),
'priority' => 40,
));
//固定ページを一覧に含める
$wp_customize->add_setting('page_include_in_list', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'page_include_in_list', array(
'settings' => 'page_include_in_list',
'label' => __( '固定ページも一覧リストに含める', 'simplicity2' ),
'description' => is_tips_visible() ? __( '固定ページを一覧リスト(インデックス)に含めるか。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 50,
));
//エントリーカード全体をリンク化
$wp_customize->add_setting('wraped_entry_card', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'wraped_entry_card', array(
'settings' => 'wraped_entry_card',
'label' => __( 'エントリーカード全体をリンク化', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'インデックスリスト・関連記事のエントリーカードやブログカード全体をAタグで囲ってリンク化するか。<br><a href="https://wp-simplicity.com/linked-entry-card/" target="_blank">機能説明</a>', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 55,
));
//サムネイル表示
$wp_customize->add_setting('thumbnail_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'thumbnail_visible', array(
'settings' => 'thumbnail_visible',
'label' => __( 'サムネイル表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サムネイルを表示するか。(※テキスト主体ページなどではオフ)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 60,
));
//サムネイルの丸め
$wp_customize->add_setting('thumbnail_radius', array(
'default' => 'default',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'thumbnail_radius', array(
'settings' => 'thumbnail_radius',
'label' => __( 'サムネイルの角の丸め具合', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サムネイル角のスタイル。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'radio',
'choices' => array(
'default' => __( '丸めない(デフォルト)', 'simplicity2' ),
'radius_10px' => __( '角を丸める', 'simplicity2' ),
'circle' => __( '円形にする', 'simplicity2' ),
),
'priority' => 70,
));
//抜粋文字数
$wp_customize->add_setting('excerpt_length', array(
'default' => '70',
'sanitize_callback' => 'sanitize_number',
));
$wp_customize->add_control( 'excerpt_length', array(
'settings' => 'excerpt_length',
'label' => __( '抜粋文字数(デフォルト:70)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'インデックスリストや関連記事、ブログカードで表示される抜粋文字の文字数を設定します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'number',
'priority' => 80,
));
//抜粋の末尾文字
$wp_customize->add_setting('excerpt_more', array(
'default' => __( '...', 'simplicity2' ),
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'excerpt_more', array(
'settings' => 'excerpt_more',
'label' => __( '抜粋の末尾文字(デフォルト:...)', 'simplicity2' ),
'description' => is_tips_visible() ? __( '抜粋文の末尾に付属する文字列を設定します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'text',
'priority' => 90,
));
//Wordpress固有の抜粋文を使用する
$wp_customize->add_setting('wordpress_excerpt', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'wordpress_excerpt', array(
'settings' => 'wordpress_excerpt',
'label' => __( '抜粋に「メタディスクリプション」項目を利用', 'simplicity2' ),
'description' => is_tips_visible() ? __( '記事一覧・ブログカードのスニペットに投稿管理画面の「抜粋」テキストを使用します。「抜粋」が入力されていない場合は「SEO設定」項目にある「メタディスクリプション」が使用されます。(※双方とも未入力の場合は記事本文冒頭の抜粋文)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 100,
));
//サイドバーの幅を336pxに
$wp_customize->add_setting('sidebar_width_336', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'sidebar_width_336', array(
'settings' => 'sidebar_width_336',
'label' => __( 'サイドバーの幅を336pxに(デフォルト300px)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイドバーを「レクタングル(大)」幅に設定します。(※ヘッダー画像を既に設定している場合は要再設定)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 110,
));
//サイドバーの背景を白色に
$wp_customize->add_setting('sidebar_background_white', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'sidebar_background_white', array(
'settings' => 'sidebar_background_white',
'label' => __( 'サイドバーの背景を白色に', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイドバーの背景色を白色に設定します。(※背景画像などを設定して、サイドバーが見づらくなったときなどに)', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 115,
));
//サイドバーを左側に表示
$wp_customize->add_setting('sidebar_left', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'sidebar_left', array(
'settings' => 'sidebar_left',
'label' => __( 'サイドバーを左側に表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'サイドバーを左側に表示するようにレイアウトを変更します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 120,
));
//検索ボックスのスタイル
$wp_customize->add_setting('search_box_style', array(
'default' => 'white_rect',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'search_box_style', array(
'settings' => 'search_box_style',
'label' => __( '検索ボックスのスタイル', 'simplicity2' ),
'description' => is_tips_visible() ? __( '検索ボックスのデザイン設定。<a href="https://wp-simplicity.com/searchform-style/" target="_blank" class="example-setting">設定方法</a>', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'radio',
'choices' => array(
'white_rect' => __( 'ホワイト四角(デフォルト)', 'simplicity2' ),
'white_circle' => __( 'ホワイト丸型', 'simplicity2' ),
'gray_rect' => __( 'グレー四角', 'simplicity2' ),
'gray_circle' => __( 'グレー丸型', 'simplicity2' ),
),
'priority' => 130,
));
//ページネーションタイプ
$wp_customize->add_setting('list_pager_type', array(
'default' => 'responsive',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'list_pager_type', array(
'settings' => 'list_pager_type',
'label' => __( 'ページネーションタイプ', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'インデックス一覧リストのページ送りのタイプ設定です。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'radio',
'choices' => array(
'responsive' => __( 'レスポンシブ(デフォルト)', 'simplicity2' ),
'old_pager' => __( '旧ページネーション', 'simplicity2' ),
),
'priority' => 135,
));
//フッターを背景色と同じにする
$wp_customize->add_setting('footer_transparent', array(
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'footer_transparent', array(
'settings' => 'footer_transparent',
'label' => __( 'フッターを背景色と同じにする', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'フッターを透過色にして背景を表示します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 140,
));
//メニューボタンアイコン
$wp_customize->add_setting('menu_button_icon_font', array(
'default' => 'fa-bars',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'menu_button_icon_font', array(
'settings' => 'menu_button_icon_font',
'label' => __( 'メニューボタンのアイコン(デフォルト:fa-bars)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'メニュー表示ボタンのアイコンフォントを設定します。アコーディオンツリーメニューのアイコンは変更できません。(※設定用のコードはFont Awesomeから取得します)<a href="https://wp-simplicity.com/button-icon-font-change/" target="_blank" class="example-setting">設定方法</a>', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'text',
'priority' => 140,
));
//トップへ戻るボタンの表示
$wp_customize->add_setting('go_to_top_button_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'go_to_top_button_visible', array(
'settings' => 'go_to_top_button_visible',
'label' => __( 'トップへ戻るボタンの表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'トップへ戻るボタンを表示するか。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 150,
));
//トップへ戻るボタンアイコン
$wp_customize->add_setting('go_to_top_button_icon_font]', array(
'default' => 'fa-angle-double-up',
'sanitize_callback' => 'sanitize_text',
));
$wp_customize->add_control( 'go_to_top_button_icon_font', array(
'settings' => 'go_to_top_button_icon_font',
'label' => __( 'トップへ戻るボタンのアイコン(デフォルト:fa-angle-double-up)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'トップへ戻るボタンのアイコンフォントを設定します。(※設定用のコードはFont Awesomeから取得します)<a href="https://wp-simplicity.com/button-icon-font-change/" target="_blank" class="example-setting">設定方法</a>', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'text',
'priority' => 160,
));
//トップへ戻るボタンに画像を指定
$wp_customize->add_setting( 'go_to_top_button_image', array(
'sanitize_callback' => 'sanitize_file_url',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'go_to_top_button_image', array(
'settings' => 'go_to_top_button_image',
'label' => __( 'トップへ戻るボタンに画像を指定', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'こちらに画像が指定されている場合は、アイコンフォントが画像に入れ替わります。', 'simplicity2' ) : '',
'section' => 'layout_section',
'priority' => 170,
) ) );
//カレンダーウィジェットに枠線を表示
$wp_customize->add_setting('calendar_border_visible', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'calendar_border_visible', array(
'settings' => 'calendar_border_visible',
'label' => __( 'カレンダーに枠線を表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'カレンダーウィジェットに枠線を表示します。', 'simplicity2' ) : '',
'section' => 'layout_section',
'type' => 'checkbox',
'priority' => 180,
));
//404イメージ
$wp_customize->add_setting( '404_image', array(
'sanitize_callback' => 'sanitize_file_url',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, '404_image', array(
'settings' => '404_image',
'label' => __( '404イメージ', 'simplicity2' ),
'description' => is_tips_visible() ? __( '404ページに表示するイメージを設定してください。<br><a href="https://wp-simplicity.com/simplicity-404-page/" target="_blank">設定方法</a>', 'simplicity2' ) : '',
'section' => 'layout_section',
'priority' => 200,
) ) );
/////////////////////////////
//レイアウト(ページ)設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'layout_singular_section', array(
'title' => __( 'レイアウト(投稿・固定ページ)', 'simplicity2' ),
'description' => is_tips_visible() ? __( '投稿・固定ページのレイアウトに関する設定です。', 'simplicity2' ) : '',
'priority' => 89.5,
));
//本文文字サイズ
$wp_customize->add_setting('article_font_size', array(
'default' => ARTICLE_FONT_SIZE,
'sanitize_callback' => 'sanitize_number',
));
$wp_customize->add_control( 'article_font_size', array(
'settings' => 'article_font_size',
'label' => __( '本文文字サイズ(全角文字数)', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'パソコン表示時の本文文字サイズを設定します。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'radio',
'choices' => array(
'14' => __( '14px(1行48文字くらい)', 'simplicity2' ),
'15' => __( '15px(1行45文字くらい)', 'simplicity2' ),
'16' => __( '16px(1行42文字くらい:デフォルト)', 'simplicity2' ),
'17' => __( '17px(1行40文字くらい)', 'simplicity2' ),
'18' => __( '18px(1行37文字くらい)', 'simplicity2' ),
'19' => __( '19px(1行35文字くらい)', 'simplicity2' ),
),
'priority' => 3,
));
//長い単語を強制改行する
$wp_customize->add_setting('word_wrap_break_word', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'word_wrap_break_word', array(
'settings' => 'word_wrap_break_word',
'label' => __( '長い単語を必要に応じて改行する', 'simplicity2' ),
'description' => is_tips_visible() ? __( '必要に応じて長い単語やURLを要素からはみ出さないように改行します。ただし、この機能を有効にすると単語の途中で改行されることもあります。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 6,
));
//モバイルで改行を表示する
$wp_customize->add_setting('br_visible_with_mobile', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'br_visible_with_mobile', array(
'settings' => 'br_visible_with_mobile',
'label' => __( 'モバイルで<br>を表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '画面幅の狭いモバイル端末でbr改行を表示するか。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 7,
));
//投稿日の表示
$wp_customize->add_setting('create_date_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'create_date_visible', array(
'settings' => 'create_date_visible',
'label' => __( '投稿日の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '投稿日を表示するか。(※一覧リストにも表示されます。)(※非表示にするとGoogle Search Consoleで構造化データエラーが出る可能性があります。)', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 7,
));
//現在との時間差の表示
$wp_customize->add_setting('human_time_diff_visible', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'human_time_diff_visible', array(
'settings' => 'human_time_diff_visible',
'label' => __( '投稿日と現在との時間差を表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '現在から投稿日を差し引いた人間の感覚的な時間差を表示します。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 7.1,
));
//更新日の表示
$wp_customize->add_setting('update_date_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'update_date_visible', array(
'settings' => 'update_date_visible',
'label' => __( '更新日の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '更新日を表示するか。(※非表示にするとGoogle Search Consoleで構造化データエラーが出る可能性があります。)', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 8,
));
//カテゴリ情報の表示
$wp_customize->add_setting('category_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'category_visible', array(
'settings' => 'category_visible',
'label' => __( 'カテゴリ情報の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'カテゴリ情報を表示するか。(※一覧リストにも表示されます)', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 9,
));
//コメント数の表示
$wp_customize->add_setting('comment_count_visible', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'comment_count_visible', array(
'settings' => 'comment_count_visible',
'label' => __( 'コメント数の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( 'コメント数リンクを表示するか。(※コメントの設定でコメントを表示にしていないと表示されません。)' , 'simplicity2' ): '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 9.5,
));
//タグ情報の表示
$wp_customize->add_setting('tag_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'tag_visible', array(
'settings' => 'tag_visible',
'label' => __( 'タグ情報の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '本文フッター部分にあるタグ情報を表示するか。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 10,
));
//投稿者情報の表示
$wp_customize->add_setting('author_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'author_visible', array(
'settings' => 'author_visible',
'label' => __( '投稿者情報の表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '本文フッター部分にある投稿者情報を表示するか。(※構造化データに必要な情報が含まれているのでオフにすると、Google Search Consoleの構造化データエラーが出ます。)', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 20,
));
//投稿者情報にTwitterIDを表示
$wp_customize->add_setting('twitter_follow_id_author_visible', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'twitter_follow_id_author_visible', array(
'settings' => 'twitter_follow_id_author_visible',
'label' => __( '投稿者情報をTwitter IDに', 'simplicity2' ),
'description' => is_tips_visible() ? __( '投稿者にTwitterのIDリンクを表示します。(※SNS設定でTwitter ID設定がされている必要があります。)', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 21,
));
//編集リンクの表示
$wp_customize->add_setting('edit_visible', array(
'default' => true,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'edit_visible', array(
'settings' => 'edit_visible',
'label' => __( '編集リンクの表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '投稿・固定ページの管理画面に直接アクセスするための編集リンクを表示するか。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 30,
));
//本文先頭にアイキャッチを表示
$wp_customize->add_setting('eye_catch_visible', array(
'default' => false,
'sanitize_callback' => 'sanitize_check',
));
$wp_customize->add_control( 'eye_catch_visible', array(
'settings' => 'eye_catch_visible',
'label' => __( '本文先頭にアイキャッチ画像を表示', 'simplicity2' ),
'description' => is_tips_visible() ? __( '投稿・固定ページ管理画面で設定したアイキャッチを自動で本文トップに挿入するか。', 'simplicity2' ) : '',
'section' => 'layout_singular_section',
'type' => 'checkbox',
'priority' => 32,
));
//本文先頭のアイキャッチにキャプションを表示
$wp_customize->add_setting('eye_catch_caption_visible', array(
'sanitize_callback' => 'sanitize_check',
));