<?php



// Add newslatter Section to Customizer
function howcan_customize_news_letter_section( $wp_customize ) {





    // Section Add
    $wp_customize->add_section( 'howcan_news_latter_section', array(
        'title' => __( 'News Latter Section', 'howcan' ),
        'priority' => 70,
        'panel' => 'howcan_theme_options_panel', // optional
    ));


   

    // Show/Hide 
    $wp_customize->add_setting('howcan_news_latter_section_on', array(
        'default'           => false,
        'sanitize_callback' => 'wp_validate_boolean',
    ));
    $wp_customize->add_control('howcan_news_latter_section_on', array(
        'label'    => __('Enable New Latter  Section ', 'howcan'),
        'section'  => 'howcan_news_latter_section',
        'type'     => 'checkbox',
    ));
    
    
    
    

    // section  Title Setting
    $wp_customize->add_setting( 'howcan_news_letter_sec_title', array(
        'default' => __( 'Lorum ipsum Doller', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_news_letter_sec_title', array(
        'label' => __( 'Section Title', 'howcan' ),
        'section' => 'howcan_news_latter_section',
        'type' => 'text',
    ));

    // section  Subtitle Setting
    $wp_customize->add_setting( 'howcan_section_subtitle', array(
        'default' => __( 'Lorum ipsum Doller is lorum ipsum Doller ', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_section_subtitle', array(
        'label' => __( 'Section Subtitle', 'howcan' ),
        'section' => 'howcan_news_latter_section',
        'type' => 'text',
    ));

    

    // section  button text
    $wp_customize->add_setting( 'howcan_news_letter_btn_txt', array(
        'default' => __( 'Subscribe', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_news_letter_btn_txt', array(
        'label' => __( 'Subscribe Button Text ', 'howcan' ),
        'section' => 'howcan_news_latter_section',
        'type' => 'text',
    ));

    // news lettar bottom note  text
    $wp_customize->add_setting( 'howcan_news_letter_bn_txt', array(
        'default' => __( 'lorum ipsum is Doller is lorum ipsum', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_news_letter_bn_txt', array(
        'label' => __( 'News Letter Bottom note Text ', 'howcan' ),
        'section' => 'howcan_news_latter_section',
        'type' => 'text',
    ));

    
}
add_action( 'customize_register', 'howcan_customize_news_letter_section' );
