<?php

/**
* Offer Settings
*
* @package bootstrap_coach
*/
add_action( 'customize_register', 'bootstrap_coach_customize_offer_option' );
function bootstrap_coach_customize_offer_option(  $wp_customize  ) {
    $wp_customize->add_section( 'bootstrap_coach_offer_section', array(
        'title' => esc_html__( 'Offer Section', 'bootstrap-coach' ),
        'panel' => 'bootstrap_coach_homepage_panel',
    ) );
    if ( fs_bootstrap_coach()->is_free_plan() ) {
        $wp_customize->add_setting( 'bootstrap_coach_offer_section_upgrade_to_pro', array(
            'sanitize_callback' => null,
        ) );
        $wp_customize->add_control( new Bootstrap_Coach_Control_Upgrade_To_Pro($wp_customize, 'bootstrap_coach_offer_section_upgrade_to_pro', array(
            'section'     => 'bootstrap_coach_offer_section',
            'settings'    => 'bootstrap_coach_offer_section_upgrade_to_pro',
            'title'       => __( 'Incorporate a Special Offer section and give your homepage a touch of excitement.', 'bootstrap-coach' ),
            'items'       => array(
                'one'   => array(
                    'title' => __( 'Captivating Offer heading', 'bootstrap-coach' ),
                ),
                'two'   => array(
                    'title' => __( 'Detailed Offer description', 'bootstrap-coach' ),
                ),
                'three' => array(
                    'title' => __( 'Attach Offer image that leaves an impression', 'bootstrap-coach' ),
                ),
                'four'  => array(
                    'title' => __( 'Finish the Offer with a call-to-action button', 'bootstrap-coach' ),
                ),
            ),
            'button_url'  => esc_url( 'https://thebootstrapthemes.com/coach/#free-vs-pro' ),
            'button_text' => __( 'Upgrade Now', 'bootstrap-coach' ),
        )) );
    }
}
