<?php
/**
 * Elementor Setting
 *
 * @package Wellness_Coach_Lite
 */

function wellness_coach_lite_customize_register_elementor( $wp_customize ) {
    
    $wp_customize->add_section(
        'elementor_settings',
        array(
            'title'      => __( 'Elementor Settings', 'wellness-coach-lite' ),
            'priority'   => 80,
            'capability' => 'edit_theme_options',
        )
    );
    
    $wp_customize->add_setting(
        'ed_elementor',
        array(
            'default'           => false,
            'sanitize_callback' => 'wellness_coach_lite_sanitize_checkbox',
        )
    );
    
    $wp_customize->add_control(
        new Wellness_Coach_Lite_Toggle_Control( 
            $wp_customize,
            'ed_elementor',
            array(
                'section'       => 'elementor_settings',
                'label'         => __( 'Enable Elementor Page Builder in FrontPage', 'wellness-coach-lite' ),
                'description'   => __( 'You can override your Homepage Contents from this Elementor Page Builder', 'wellness-coach-lite' ),
            )
        )
    );   
        
}
add_action( 'customize_register', 'wellness_coach_lite_customize_register_elementor' );