<?php

// About or Intro section
function howcan_about_intro( $wp_customize ) {

    // Feature or Benifit Section
    $wp_customize->add_section( 'howcan_about_intro', array(
        'title'       => __( 'About / Intro Section', 'howcan' ),
        'priority'    => 20,
        'description' => __( 'Settings for the About / Intro section', 'howcan' ),
        'panel' =>  'howcan_theme_options_panel',
    ) );


    // Show/Hide about and intro 
    $wp_customize->add_setting('howcan_about_intro_on', array(
        'default'           => false,
        'sanitize_callback' => 'wp_validate_boolean',
    ));
    $wp_customize->add_control('howcan_about_intro_on', array(
        'label'    => __('Enable About or Intro Section ', 'howcan'),
        'section'  => 'howcan_about_intro',
        'type'     => 'checkbox',
    ));

    

    //  section Title
    $wp_customize->add_setting( 'about_section_title', array(
        'default'           => __( 'About', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_section_title', array(
        'label'   => __( 'Section Title', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'text',
    ) );

    //  section desc
    $wp_customize->add_setting( 'about_section_desc', array(
        'default'           => __( 'Lorum Ipsum is Lorum Ipsum is Lorum', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_section_desc', array(
        'label'   => __( 'Section description', 'howcan' ),
      'section' => 'howcan_about_intro',
        'type'    => 'textarea',
    ) );





    // about headeing 
    $wp_customize->add_setting( 'about_heading_right', array(
        'default'           => __( 'Welcome to HowCan wordpress Theme', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_heading_right', array(
        'label'   => __( 'About Right  Heading ', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'text',
    ) );

    // about image 
    $wp_customize->add_setting( 'about_img', array(
        'default'           => __( 'http://localhost:8000/wordpress-6.8.2-en_GB/wordpress/wp-content/uploads/2025/09/1758334634282.jpg', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_img', array(
        'label'   => __( 'About section Image ', 'howcan' ),
        'description' => __( 'Add an Image in About or Intro Section  ', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'text',
    ) );


    // about para
    $wp_customize->add_setting( 'about_para_right', array(
        'default'           => __( 'Lorum Ipsum is Doller is Lorum Ipsum is Doller is Lorum', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_para_right', array(
        'label'   => __( 'About or Intro Short Paragraph', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'textarea',
    ) );


    //----- button text 
    $wp_customize->add_setting( 'about_btn_txt', array(
        'default'           => __( 'Learn More', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_btn_txt', array(
        'label'   => __( 'About Button Text ', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'text',
    ) );

    //  button link
    $wp_customize->add_setting( 'about_btn_link', array(
        'default'           => __( '#', 'howcan' ),
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'about_btn_link', array(
        'label'   => __( 'About Button Action Link ', 'howcan' ),
        'description' => __( 'About Button Link', 'howcan' ),
        'section' => 'howcan_about_intro',
        'type'    => 'text',
    ) );




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

