<?php

/**
 * Search Settings
 *
 * @package Travel Tour
 */
add_action( 'customize_register', 'travel_tour_customize_search_section' );
function travel_tour_customize_search_section(  $wp_customize  ) {
    $wp_customize->add_section( 'travel_tour_search_sections', array(
        'title'       => esc_html__( 'Advanced Search Section', 'travel-tour' ),
        'description' => esc_html__( 'Advanced Search Section :', 'travel-tour' ),
        'panel'       => 'travel_tour_homepage_panel',
        'priority'    => 2,
    ) );
    if ( fs_travel_tour()->is_free_plan() ) {
        $wp_customize->add_setting( 'travel_tour_advanced_search_section_upgrade_to_pro', array(
            'sanitize_callback' => null,
        ) );
        $wp_customize->add_control( new Travel_Tour_Control_Upgrade_To_Pro($wp_customize, 'travel_tour_advanced_search_section_upgrade_to_pro', array(
            'section'     => 'travel_tour_search_sections',
            'settings'    => 'travel_tour_advanced_search_section_upgrade_to_pro',
            'title'       => __( 'Show the Advanced search section so that users can easily find their preferred trip.', 'travel-tour' ),
            'items'       => array(
                'one' => array(
                    'title' => __( 'Search trips by Destination, Activities, Duration, and Budget', 'travel-tour' ),
                ),
            ),
            'button_url'  => esc_url( 'https://thebootstrapthemes.com/travel-tour/#free-vs-pro' ),
            'button_text' => __( 'Upgrade Now', 'travel-tour' ),
        )) );
    }
}
