add_panel( 'panel_detail', array( 'title' => esc_html__( '詳細表示', 'baumkupen' ), 'priority'=> 50, ) ); // セクション 投稿一覧 $wp_customize->add_section( 'section_detail_index_post', array( 'title' => esc_html__( '投稿一覧', 'baumkupen' ), 'panel'=>'panel_detail', ) ); // 投稿一覧の抜粋の文字の長さ $wp_customize->add_setting( 'index_excerpt_length', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 55, ) ); $wp_customize->add_control( new Baumkupen_Range_Number_Control( $wp_customize, 'index_excerpt_length', array( 'section' => 'section_detail_index_post', 'description' => esc_html__( '抜粋の文字数', 'baumkupen' ), 'input_attrs' => array( 'min' => 1, 'max' => 500, 'step'=> 1, ), ) ) ); // 投稿一覧の抜粋の表示(モバイル) $wp_customize->add_setting( 'display_index_excerpt_mobile', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_index_excerpt_mobile', array( 'type' => 'checkbox', 'section' => 'section_detail_index_post', 'label' => esc_html__( '抜粋を表示する(モバイル)', 'baumkupen' ), ) ); // 投稿一覧の抜粋の表示(デスクトップ) $wp_customize->add_setting( 'display_index_excerpt_desktop', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_index_excerpt_desktop', array( 'type' => 'checkbox', 'section' => 'section_detail_index_post', 'label' => esc_html__( '抜粋を表示する(デスクトップ)', 'baumkupen' ), ) ); // 投稿一覧 コメント数の表示(共通) $wp_customize->add_setting( 'display_index_post_comments_number', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_index_post_comments_number', array( 'type' => 'checkbox', 'section' => 'section_detail_index_post', 'label' => esc_html__( 'コメント数を表示する(共通)', 'baumkupen' ), ) ); // 投稿一覧 カテゴリの表示(共通) $wp_customize->add_setting( 'display_index_post_category', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_index_post_category', array( 'type' => 'checkbox', 'section' => 'section_detail_index_post', 'label' => esc_html__( 'カテゴリを表示する(共通)', 'baumkupen' ), ) ); // 投稿一覧 タグの表示(共通) $wp_customize->add_setting( 'display_index_post_tag', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_index_post_tag', array( 'type' => 'checkbox', 'section' => 'section_detail_index_post', 'label' => esc_html__( 'タグを表示する(共通)', 'baumkupen' ), ) ); // セクション 投稿一覧 終了 // セクション 投稿内 $wp_customize->add_section( 'section_detail_single_post', array( 'title' => esc_html__( '投稿内', 'baumkupen' ), 'panel'=>'panel_detail', ) ); // 投稿日を表示する $wp_customize->add_setting( 'display_single_post_date_posted', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_single_post_date_posted', array( 'type' => 'checkbox', 'section' => 'section_detail_single_post', 'label' => esc_html__( '投稿日を表示する', 'baumkupen' ), ) ); // 更新日を表示する $wp_customize->add_setting( 'display_single_post_date_modified', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_single_post_date_modified', array( 'type' => 'checkbox', 'section' => 'section_detail_single_post', 'label' => esc_html__( '更新日を表示する', 'baumkupen' ), ) ); // カテゴリの表示 $wp_customize->add_setting( 'display_single_post_category', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_single_post_category', array( 'type' => 'checkbox', 'section' => 'section_detail_single_post', 'label' => esc_html__( 'カテゴリを表示する', 'baumkupen' ), ) ); // タグの表示 $wp_customize->add_setting( 'display_single_post_tag', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => true, ) ); $wp_customize->add_control( 'display_single_post_tag', array( 'type' => 'checkbox', 'section' => 'section_detail_single_post', 'label' => esc_html__( 'タグを表示する', 'baumkupen' ), ) ); // セクション 投稿内 終了 }