<?php

// cta section 
function howcan_customize_cta_section( $wp_customize ) {

    // Section Add
    $wp_customize->add_section( 'howcan_cta_section', array(
        'title' => __( 'CTA Section', 'howcan' ),
        'priority' => 50,
        'panel' => 'howcan_theme_options_panel', // optional
    ));


   

    // Show/Hide cta section 
    $wp_customize->add_setting('howcan_cta_on', array(
        'default'           => false,
        'sanitize_callback' => 'wp_validate_boolean',
    ));
    $wp_customize->add_control('howcan_cta_on', array(
        'label'    => __('Enable CTA  Section ', 'howcan'),
        'section'  => 'howcan_cta_section',
        'type'     => 'checkbox',
    ));
    
    
    
    

    // cta section Title
    $wp_customize->add_setting( 'cta_section_title', array(
        'default' => __( 'Start You Jurney ', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'cta_section_title', array(
        'label' => __( 'CTA Section Title', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));

    // cta short para 
    $wp_customize->add_setting( 'howcan_cta_subtitle', array(
        'default' => __( 'Lorum ipsum Doller is lorum ipsum Doller is lorum ipsum is Doller. ', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_cta_subtitle', array(
        'label' => __( 'CTA Section Subtitle', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));


///------- left button 
    // cta left button text 
    $wp_customize->add_setting( 'howcan_cta_lbt', array(
        'default' => __( 'Lorum ipsum  ', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_cta_lbt', array(
        'label' => __( 'CTA Section Left Button Text ', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));

    // cta left button link 
    $wp_customize->add_setting( 'howcan_cta_lbl', array(
        'default' => __( '#', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_cta_lbl', array(
        'label' => __( 'CTA Section Left Button Link ', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));
    

///------- right button 
    // cta right button text 
    $wp_customize->add_setting( 'howcan_cta_rbt', array(
        'default' => __( 'Lorum ipsum  ', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_cta_rbt', array(
        'label' => __( 'CTA Section Right Button Text ', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));

    // cta right button link 
    $wp_customize->add_setting( 'howcan_cta_rbl', array(
        'default' => __( '#', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control( 'howcan_cta_rbl', array(
        'label' => __( 'CTA Section Left Button Link ', 'howcan' ),
        'section' => 'howcan_cta_section',
        'type' => 'text',
    ));
    

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