HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpprotonperinggit/wp-content/themes/voiture/inc/vendors/wp-cardealer/customizer.php
<?php

function voiture_wp_cardealer_customize_register( $wp_customize ) {
    // Listings Panel
    $wp_customize->add_panel( 'voiture_settings_listing', array(
        'title' => esc_html__( 'Listings Settings', 'voiture' ),
        'priority' => 4,
    ) );

    // General Section
    $wp_customize->add_section('voiture_settings_listing_general', array(
        'title'    => esc_html__('General', 'voiture'),
        'priority' => 1,
        'panel' => 'voiture_settings_listing',
    ));

    // Breadcrumbs Setting ?
    $wp_customize->add_setting('voiture_theme_options[listing_breadcrumbs_setting]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control( new Voiture_WP_Customize_Heading_Control($wp_customize, 'listing_breadcrumbs_setting', array(
        'label'    => esc_html__('Breadcrumbs Settings', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'settings' => 'voiture_theme_options[listing_breadcrumbs_setting]',
    )));

    // Breadcrumbs
    $wp_customize->add_setting('voiture_theme_options[show_listing_breadcrumbs]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => 1,
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_listing_breadcrumbs', array(
        'settings' => 'voiture_theme_options[show_listing_breadcrumbs]',
        'label'    => esc_html__('Breadcrumbs', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'type'     => 'checkbox',
    ));

    // Breadcrumbs Background Color
    $wp_customize->add_setting('voiture_theme_options[listing_breadcrumb_color]', array(
        'default'           => '',
        'sanitize_callback' => 'sanitize_hex_color',
        'capability'        => 'edit_theme_options',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'listing_breadcrumb_color', array(
        'label'    => esc_html__('Breadcrumbs Background Color', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'settings' => 'voiture_theme_options[listing_breadcrumb_color]',
    )));

    // Breadcrumbs Background
    $wp_customize->add_setting('voiture_theme_options[listing_breadcrumb_image]', array(
        'default'           => '',
        'capability'        => 'edit_theme_options',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',

    ));

    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'listing_breadcrumb_image', array(
        'label'    => esc_html__('Breadcrumbs Background', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'settings' => 'voiture_theme_options[listing_breadcrumb_image]',
    )));

    // Other Setting ?
    $wp_customize->add_setting('voiture_theme_options[listing_other_setting]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control( new Voiture_WP_Customize_Heading_Control($wp_customize, 'listing_other_setting', array(
        'label'    => esc_html__('Other Settings', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'settings' => 'voiture_theme_options[listing_other_setting]',
    )));

    // Show Full Phone Number
    $wp_customize->add_setting('voiture_theme_options[listing_show_full_phone]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => '',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listing_show_full_phone', array(
        'settings' => 'voiture_theme_options[listing_show_full_phone]',
        'label'    => esc_html__('Show Full Phone Number', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'type'     => 'checkbox',
    ));

    // Enable Favorite
    $wp_customize->add_setting('voiture_theme_options[listing_enable_favorite]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => '1',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listing_enable_favorite', array(
        'settings' => 'voiture_theme_options[listing_enable_favorite]',
        'label'    => esc_html__('Enable Favorite', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'type'     => 'checkbox',
    ));

    // Enable Compare
    $wp_customize->add_setting('voiture_theme_options[listing_enable_compare]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => '1',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listing_enable_compare', array(
        'settings' => 'voiture_theme_options[listing_enable_compare]',
        'label'    => esc_html__('Enable Compare', 'voiture'),
        'section'  => 'voiture_settings_listing_general',
        'type'     => 'checkbox',
    ));



    // Listing Archives
    $wp_customize->add_section('voiture_settings_listing_archive', array(
        'title'    => esc_html__('Listing Archives', 'voiture'),
        'priority' => 2,
        'panel' => 'voiture_settings_listing',
    ));

    // General Setting ?
    $wp_customize->add_setting('voiture_theme_options[listings_general_setting]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control( new Voiture_WP_Customize_Heading_Control($wp_customize, 'listings_general_setting', array(
        'label'    => esc_html__('General Settings', 'voiture'),
        'section'  => 'voiture_settings_listing_archive',
        'settings' => 'voiture_theme_options[listings_general_setting]',
    )));

    // Is Full Width
    $wp_customize->add_setting('voiture_theme_options[listings_fullwidth]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listings_fullwidth', array(
        'settings' => 'voiture_theme_options[listings_fullwidth]',
        'label'    => esc_html__('Is Full Width', 'voiture'),
        'section'  => 'voiture_settings_listing_archive',
        'type'     => 'checkbox',
    ));

    // layout
    $wp_customize->add_setting( 'voiture_theme_options[listings_layout_type]', array(
        'default'        => 'default',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_layout', array(
        'label'   => esc_html__('Listings Layout Style', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
            'default' => esc_html__('Default', 'voiture'),
            'half-map' => esc_html__('Half Map', 'voiture'),
            'top-map' => esc_html__('Top Map', 'voiture'),
        ),
        'settings' => 'voiture_theme_options[listings_layout_type]',
        'description' => esc_html__('Select the variation you want to apply on your blog.', 'voiture'),
    ) );

    // layout
    $wp_customize->add_setting( 'voiture_theme_options[listings_layout_sidebar]', array(
        'default'        => 'left-main',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );

    $wp_customize->add_control( new Voiture_WP_Customize_Radio_Image_Control( 
        $wp_customize, 
        'apus_settings_listings_layout_sidebar', 
        array(
            'label'   => esc_html__('Layout Type', 'voiture'),
            'section' => 'voiture_settings_listing_archive',
            'type'    => 'select',
            'choices' => array(
                'main' => array(
                    'title' => esc_html__('Main Only', 'voiture'),
                    'img' => get_template_directory_uri() . '/inc/assets/images/screen1.png'
                ),
                'left-main' => array(
                    'title' => esc_html__('Left - Main Sidebar', 'voiture'),
                    'img' => get_template_directory_uri() . '/inc/assets/images/screen2.png'
                ),
                'main-right' => array(
                    'title' => esc_html__('Main - Right Sidebar', 'voiture'),
                    'img' => get_template_directory_uri() . '/inc/assets/images/screen3.png'
                ),
            ),
            'settings' => 'voiture_theme_options[listings_layout_sidebar]',
            'description' => wp_kses(__('Select a sidebar layout for layout type <strong>"Default", "Top Map"</strong>.', 'voiture'), array('strong' => array())),
        ) 
    ));


    // Show Filter Top
    $wp_customize->add_setting('voiture_theme_options[listings_show_filter_top]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listings_show_filter_top', array(
        'settings' => 'voiture_theme_options[listings_show_filter_top]',
        'label'    => esc_html__('Show Filter Top', 'voiture'),
        'section'  => 'voiture_settings_listing_archive',
        'type'     => 'checkbox',
    ));

    $columns = array( '1' => esc_html__('1 Column', 'voiture'),
        '2' => esc_html__('2 Columns', 'voiture'),
        '3' => esc_html__('3 Columns', 'voiture'),
        '4' => esc_html__('4 Columns', 'voiture'),
        '5' => esc_html__('5 Columns', 'voiture'),
        '6' => esc_html__('6 Columns', 'voiture'),
        '7' => esc_html__('7 Columns', 'voiture'),
        '8' => esc_html__('8 Columns', 'voiture'),
    );

    // Listings Filter Top Sidebar
    $wp_customize->add_setting( 'voiture_theme_options[listings_filter_top_sidebar]', array(
        'default'        => 'listings-filter-top',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_filter_top_sidebar', array(
        'label'   => esc_html__('Listings Filter Top Sidebar', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
                    'listings-filter-top' => esc_html__('Listings Filter Top Sidebar', 'voiture'),
                    'listings-filter-top2' => esc_html__('Listings Filter Top Sidebar 2', 'voiture'),
                ),
        'settings' => 'voiture_theme_options[listings_filter_top_sidebar]',
    ) );

    // Listings Filter Sidebar
    $wp_customize->add_setting( 'voiture_theme_options[listings_filter_sidebar]', array(
        'default'        => 'listings-filter',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_filter_sidebar', array(
        'label'   => esc_html__('Listings Filter Sidebar', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
                    'listings-filter' => esc_html__('Listings Filter Sidebar', 'voiture'),
                    'listings-filter2' => esc_html__('Listings Filter Sidebar 2', 'voiture'),
                ),
        'settings' => 'voiture_theme_options[listings_filter_sidebar]',
        'description' => esc_html__('Choose a sidebar for right sidebar', 'voiture'),
    ) );

    // Display Mode
    $wp_customize->add_setting( 'voiture_theme_options[listings_display_mode]', array(
        'default'        => 'grid',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_display_mode', array(
        'label'   => esc_html__('Display Mode', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
            'grid' => esc_html__('Grid', 'voiture'),
            'list' => esc_html__('List', 'voiture'),
        ),
        'settings' => 'voiture_theme_options[listings_display_mode]',
    ) );

    // Listings List Style
    $wp_customize->add_setting( 'voiture_theme_options[listings_inner_list_style]', array(
        'default'        => 'grid',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_listings_inner_list_style', array(
        'label'   => esc_html__('Listings List Style', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
            'list' => esc_html__('List style default', 'voiture'),
            'list-v1' => esc_html__('List style v1', 'voiture'),
        ),
        'subtitle' => esc_html__('Choose a default display listing list style for archive listing.', 'voiture'),
        'settings' => 'voiture_theme_options[listings_inner_list_style]',
    ) );

    // Listings Grid Style
    $wp_customize->add_setting( 'voiture_theme_options[listings_inner_grid_style]', array(
        'default'        => 'grid',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_listings_inner_grid_style', array(
        'label'   => esc_html__('Listings Grid Style', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
            'grid' => esc_html__('Grid style default', 'voiture'),
            'grid-v1' => esc_html__('Grid style v1', 'voiture'),
            'grid-v2' => esc_html__('Grid style v2', 'voiture'),
            'grid-v3' => esc_html__('Grid style v3', 'voiture'),
        ),
        'subtitle' => esc_html__('Choose a default display listing grid style for archive listing.', 'voiture'),
        'settings' => 'voiture_theme_options[listings_inner_grid_style]',
    ) );

    // Grid Columns
    $wp_customize->add_setting( 'voiture_theme_options[listings_columns]', array(
        'default'        => '3',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_listings_columns', array(
        'label'   => esc_html__('Listings Grid Columns', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => $columns,
        'settings' => 'voiture_theme_options[listings_columns]',
    ) );

    // List Columns
    $wp_customize->add_setting( 'voiture_theme_options[listings_list_columns]', array(
        'default'        => '2',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_listings_list_columns', array(
        'label'   => esc_html__('Listings List Columns', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => $columns,
        'settings' => 'voiture_theme_options[listings_list_columns]',
    ) );

    // Pagination
    $wp_customize->add_setting( 'voiture_theme_options[listings_pagination]', array(
        'default'        => 'default',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_archive_listings_pagination', array(
        'label'   => esc_html__('Listings Pagination', 'voiture'),
        'section' => 'voiture_settings_listing_archive',
        'type'    => 'select',
        'choices' => array(
            'default' => esc_html__('Default', 'voiture'),
            'loadmore' => esc_html__('Load More Button', 'voiture'),
            'infinite' => esc_html__('Infinite Scrolling', 'voiture'),
        ),
        'settings' => 'voiture_theme_options[listings_pagination]',
    ) );



    // Single Listing
    $wp_customize->add_section('voiture_settings_listing_single', array(
        'title'    => esc_html__('Listing Single', 'voiture'),
        'priority' => 3,
        'panel' => 'voiture_settings_listing',
    ));

    // General Setting ?
    $wp_customize->add_setting('voiture_theme_options[listing_single_general_setting]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control( new Voiture_WP_Customize_Heading_Control($wp_customize, 'listing_single_general_setting', array(
        'label'    => esc_html__('General Settings', 'voiture'),
        'section'  => 'voiture_settings_listing_single',
        'settings' => 'voiture_theme_options[listing_single_general_setting]',
    )));

    // Is Full Width
    $wp_customize->add_setting('voiture_theme_options[listing_fullwidth]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listing_fullwidth', array(
        'settings' => 'voiture_theme_options[listing_fullwidth]',
        'label'    => esc_html__('Is Full Width', 'voiture'),
        'section'  => 'voiture_settings_listing_single',
        'type'     => 'checkbox',
    ));

    // Listing Layout
    $wp_customize->add_setting( 'voiture_theme_options[listing_layout_type]', array(
        'default'        => 'v1',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_single_listing_layout_type', array(
        'label'   => esc_html__('Listing Layout', 'voiture'),
        'section' => 'voiture_settings_listing_single',
        'type'    => 'select',
        'choices' => array(
            'v1' => esc_html__('Layout 1', 'voiture'),
            'v2' => esc_html__('Layout 2', 'voiture'),
            'v3' => esc_html__('Layout 3', 'voiture'),
            'v4' => esc_html__('Layout 4', 'voiture'),
            'v5' => esc_html__('Layout 5', 'voiture'),
            'v6' => esc_html__('Layout 6', 'voiture'),
        ),
        'settings' => 'voiture_theme_options[listing_layout_type]',
    ) );

    // Show Social Share
    $wp_customize->add_setting('voiture_theme_options[show_listing_social_share]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'       => '1',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_listing_social_share', array(
        'settings' => 'voiture_theme_options[show_listing_social_share]',
        'label'    => esc_html__('Show Social Share', 'voiture'),
        'section'  => 'voiture_settings_listing_single',
        'type'     => 'checkbox',
    ));

    $contents = apply_filters('voiture_listing_single_sort_content', array(
        'description' => esc_html__('Description', 'voiture'),
        'detail' => esc_html__('Detail', 'voiture'),
        'attachments' => esc_html__('Attachments', 'voiture'),
        'features' => esc_html__('Features', 'voiture'),
        'location' => esc_html__('Location', 'voiture'),
        'related' => esc_html__('Related', 'voiture'),
    ));
    foreach ($contents as $key => $value) {
        // Show Social Share
        $wp_customize->add_setting('voiture_theme_options[show_listing_'.$key.']', array(
            'capability' => 'edit_theme_options',
            'type'       => 'option',
            'default'       => '1',
            'sanitize_callback' => 'sanitize_text_field',
        ));

        $wp_customize->add_control('voiture_theme_options_show_listing_'.$key, array(
            'settings' => 'voiture_theme_options[show_listing_'.$key.']',
            'label'    => sprintf(esc_html__('Show %s', 'voiture'), $value),
            'section'  => 'voiture_settings_listing_single',
            'type'     => 'checkbox',
        ));
    }

    // Show Description View More
    $wp_customize->add_setting('voiture_theme_options[show_listing_desc_view_more]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'       => '1',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_listing_desc_view_more', array(
        'settings' => 'voiture_theme_options[show_listing_desc_view_more]',
        'label'    => esc_html__('Show Description View More', 'voiture'),
        'section'  => 'voiture_settings_listing_single',
        'type'     => 'checkbox',
    ));

    // Number related listings
    $wp_customize->add_setting( 'voiture_theme_options[listing_related_number]', array(
        'default'        => '4',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_single_listing_related_number', array(
        'label'   => esc_html__('Number related listings', 'voiture'),
        'section' => 'voiture_settings_listing_single',
        'type'    => 'number',
        'settings' => 'voiture_theme_options[listing_related_number]',
    ) );

    // Related Listings Columns
    $wp_customize->add_setting( 'voiture_theme_options[listing_related_columns]', array(
        'default'        => '4',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_single_listing_related_columns', array(
        'label'   => esc_html__('Related Listings Columns', 'voiture'),
        'section' => 'voiture_settings_listing_single',
        'type'    => 'select',
        'choices' => $columns,
        'settings' => 'voiture_theme_options[listing_related_columns]',
    ) );


    // Print Listing
    $wp_customize->add_section('voiture_settings_listing_print', array(
        'title'    => esc_html__('Listing Print', 'voiture'),
        'priority' => 4,
        'panel' => 'voiture_settings_listing',
    ));

    // Show Print Button
    $wp_customize->add_setting('voiture_theme_options[listing_enable_printer]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'       => '1',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_listing_enable_printer', array(
        'settings' => 'voiture_theme_options[listing_enable_printer]',
        'label'    => esc_html__('Show Print Button', 'voiture'),
        'section'  => 'voiture_settings_listing_print',
        'type'     => 'checkbox',
    ));

    // Print Logo
    $wp_customize->add_setting('voiture_theme_options[print-logo]', array(
        'default'           => '',
        'capability'        => 'edit_theme_options',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',

    ));

    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'print-logo', array(
        'label'    => esc_html__('Print Logo', 'voiture'),
        'section'  => 'voiture_settings_listing_print',
        'settings' => 'voiture_theme_options[print-logo]',
    )));

    $contents = apply_filters('voiture_listing_single_print_content', array(
        'header' => esc_html__('Print Header', 'voiture'),
        'qrcode' => esc_html__('Qrcode', 'voiture'),
        'author' => esc_html__('Author', 'voiture'),
        'description' => esc_html__('Description', 'voiture'),
        'detail' => esc_html__('Detail', 'voiture'),
        'features' => esc_html__('Features', 'voiture'),
        'gallery' => esc_html__('Gallery', 'voiture'),
    ));

    foreach ($contents as $key => $value) {
        // Show Social Share
        $wp_customize->add_setting('voiture_theme_options[show_print_'.$key.']', array(
            'capability' => 'edit_theme_options',
            'type'       => 'option',
            'default'       => '1',
            'sanitize_callback' => 'sanitize_text_field',
        ));

        $wp_customize->add_control('voiture_theme_options_show_print_'.$key, array(
            'settings' => 'voiture_theme_options[show_print_'.$key.']',
            'label'    => sprintf(esc_html__('Show %s', 'voiture'), $value),
            'section'  => 'voiture_settings_listing_print',
            'type'     => 'checkbox',
        ));
    }




    // User Profile Settings
    $wp_customize->add_section('voiture_settings_listing_user_profile', array(
        'title'    => esc_html__('User Profile Settings', 'voiture'),
        'priority' => 5,
        'panel' => 'voiture_settings_listing',
    ));

    // layout
    $wp_customize->add_setting( 'voiture_theme_options[user_single_layout]', array(
        'default'        => '',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_user_profile_layout', array(
        'label'   => esc_html__('Layout Type', 'voiture'),
        'section' => 'voiture_settings_listing_user_profile',
        'type'    => 'select',
        'choices' => array(
            'main' => esc_html__('Main Only', 'voiture'),
            'left-main' => esc_html__('Left - Main Sidebar', 'voiture'),
            'main-right' => esc_html__('Main - Right Sidebar', 'voiture'),
        ),
        'settings' => 'voiture_theme_options[user_single_layout]',
        'description' => esc_html__('Select the variation you want to apply on your blog.', 'voiture'),
    ) );

    // Is Full Width
    $wp_customize->add_setting('voiture_theme_options[user_profile_fullwidth]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_user_profile_fullwidth', array(
        'settings' => 'voiture_theme_options[user_profile_fullwidth]',
        'label'    => esc_html__('Is Full Width', 'voiture'),
        'section'  => 'voiture_settings_listing_user_profile',
        'type'     => 'checkbox',
    ));

    global $wp_registered_sidebars;
    $sidebars = array();

    if ( is_admin() && !empty($wp_registered_sidebars) ) {
        foreach ($wp_registered_sidebars as $sidebar) {
            $sidebars[$sidebar['id']] = $sidebar['name'];
        }
    }

    // Left Sidebar
    $wp_customize->add_setting( 'voiture_theme_options[user_profile_left_sidebar]', array(
        'default'        => '',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_user_profile_left_sidebar', array(
        'label'   => esc_html__('Archive Left Sidebar', 'voiture'),
        'section' => 'voiture_settings_listing_user_profile',
        'type'    => 'select',
        'choices' => $sidebars,
        'settings' => 'voiture_theme_options[user_profile_left_sidebar]',
        'description' => esc_html__('Choose a sidebar for left sidebar', 'voiture'),
    ) );

    // Right Sidebar
    $wp_customize->add_setting( 'voiture_theme_options[user_profile_right_sidebar]', array(
        'default'        => '',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_user_profile_right_sidebar', array(
        'label'   => esc_html__('Archive Right Sidebar', 'voiture'),
        'section' => 'voiture_settings_listing_user_profile',
        'type'    => 'select',
        'choices' => $sidebars,
        'settings' => 'voiture_theme_options[user_profile_right_sidebar]',
        'description' => esc_html__('Choose a sidebar for right sidebar', 'voiture'),
    ) );

    // Show User Gallery
    $wp_customize->add_setting('voiture_theme_options[show_user_gallery]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => 1,
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_user_gallery', array(
        'settings' => 'voiture_theme_options[show_user_gallery]',
        'label'    => esc_html__('Show User Gallery', 'voiture'),
        'section'  => 'voiture_settings_listing_user_profile',
        'type'     => 'checkbox',
    ));

    // Show User Location
    $wp_customize->add_setting('voiture_theme_options[show_user_location]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => 1,
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_user_location', array(
        'settings' => 'voiture_theme_options[show_user_location]',
        'label'    => esc_html__('Show User Location', 'voiture'),
        'section'  => 'voiture_settings_listing_user_profile',
        'type'     => 'checkbox',
    ));

    // Show User Listings
    $wp_customize->add_setting('voiture_theme_options[show_user_listings]', array(
        'capability' => 'edit_theme_options',
        'type'       => 'option',
        'default'    => 1,
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('voiture_theme_options_show_user_listings', array(
        'settings' => 'voiture_theme_options[show_user_listings]',
        'label'    => esc_html__('Show User Listings', 'voiture'),
        'section'  => 'voiture_settings_listing_user_profile',
        'type'     => 'checkbox',
    ));

    // Number user listings
    $wp_customize->add_setting( 'voiture_theme_options[user_listings_number]', array(
        'default'        => '4',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_user_profile_user_listings_number', array(
        'label'   => esc_html__('Number user listings', 'voiture'),
        'section' => 'voiture_settings_listing_user_profile',
        'type'    => 'number',
        'settings' => 'voiture_theme_options[user_listings_number]',
    ) );

    // Number user listings columnscolumns
    $wp_customize->add_setting( 'voiture_theme_options[user_listings_columns]', array(
        'default'        => '4',
        'type'           => 'option',
        'sanitize_callback' => 'sanitize_text_field',
    ) );
    $wp_customize->add_control( 'voiture_settings_listing_user_profile_user_listings_columns', array(
        'label'   => esc_html__('Number user listings columns', 'voiture'),
        'section' => 'voiture_settings_listing_user_profile',
        'type'    => 'select',
        'choices' => $columns,
        'settings' => 'voiture_theme_options[user_listings_columns]',
    ) );
}
add_action( 'customize_register', 'voiture_wp_cardealer_customize_register', 15 );