<?php
/**
 * Theme Options.
 *
 * @package Prime Charity Trust
 */

$default = prime_charity_trust_get_default_theme_options();

// Add Panel.
$wp_customize->add_panel( 'theme_option_panel',
	array(
	'title'      => __( 'Theme Options', 'prime-charity-trust' ),
	'priority'   => 30,
	'capability' => 'edit_theme_options',
	)
);

// Typography Setting Title
$wp_customize->add_section('prime_charity_trust_typography_setting', 
	array(    
	'title'       => __('Typography Settings', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

 // Array of fonts to choose from
    $font_choices = array(
        ''               => __('Select', 'prime-charity-trust'),
        'arial'          => 'Arial, sans-serif',
        'verdana'        => 'Verdana, sans-serif',
        'helvetica'      => 'Helvetica, sans-serif',
        'times-new-roman'=> '"Times New Roman", serif',
        'georgia'        => 'Georgia, serif',
        'courier-new'    => '"Courier New", monospace',
        'trebuchet-ms'   => '"Trebuchet MS", sans-serif',
        'tahoma'         => 'Tahoma, sans-serif',
        'palatino'       => '"Palatino Linotype", serif',
        'garamond'       => 'Garamond, serif',
        'impact'         => 'Impact, sans-serif',
        'comic-sans-ms'  => '"Comic Sans MS", cursive, sans-serif',
        'lucida-sans'    => '"Lucida Sans Unicode", sans-serif',
        'arial-black'    => '"Arial Black", sans-serif',
        'gill-sans'      => '"Gill Sans", sans-serif',
        'segoe-ui'       => '"Segoe UI", sans-serif',
        'open-sans'      => '"Open Sans", sans-serif',
        'roboto'         => 'Roboto, sans-serif',
        'lato'           => 'Lato, sans-serif',
        'montserrat'     => 'Montserrat, sans-serif',
        'libre-baskerville' => 'Libre Baskerville',
    );

    // Heading Font Setting
    $wp_customize->add_setting('prime_charity_trust_heading_font_family', array(
        'default'           => '',
        'sanitize_callback' => 'prime_charity_trust_sanitize_select',
    ));
    $wp_customize->add_control('prime_charity_trust_heading_font_family', array(
        'type'    => 'select',
        'choices' => $font_choices,
        'label'   => __('Select Font for Heading', 'prime-charity-trust'),
        'section' => 'prime_charity_trust_typography_setting',
    ));

    // Body Font Setting
    $wp_customize->add_setting('prime_charity_trust_body_font_family', array(
        'default'           => '',
        'sanitize_callback' => 'prime_charity_trust_sanitize_select',
    ));
    $wp_customize->add_control('prime_charity_trust_body_font_family', array(
        'type'    => 'select',
        'choices' => $font_choices,
        'label'   => __('Select Font for Body', 'prime-charity-trust'),
        'section' => 'prime_charity_trust_typography_setting',
    ));

// Single Post Setting Title
$wp_customize->add_section('section_single_post_setting', 
	array(    
	'title'       => __('Single Post Setting', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

//Author Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_author_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_author_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_author_setting]',
    array(
        'label'       => __( 'Show Author', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Date Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_date_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_date_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_date_setting]',
    array(
        'label'       => __( 'Show Date', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Categories Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_categories_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_categories_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_categories_setting]',
    array(
        'label'       => __( 'Show Categories', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Comment Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_comment_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_comment_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_comment_setting]',
    array(
        'label'       => __( 'Show Comments', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Post Pagination Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_single_page_pagination_setting]', 
    array(
        'default'           => $default['prime_charity_trust_single_page_pagination_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_single_page_pagination_setting]',
    array(
        'label'       => __( 'Show Post Pagination', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);


//Tags Content Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_single_tags_setting]', 
    array(
        'default'           => $default['prime_charity_trust_single_tags_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_single_tags_setting]',
    array(
        'label'       => __( 'Show Tags', 'prime-charity-trust' ),
        'section'     => 'section_single_post_setting',
        'type'        => 'checkbox',
    )
);

//Post Setting
$wp_customize->add_section('section_post_setting', 
	array(    
	'title'       => __('Post Setting', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

//Image Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_feature_image_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_feature_image_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_feature_image_setting]',
    array(
        'label'       => __( 'Show Post Image', 'prime-charity-trust' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Title Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_title_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_title_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_title_setting]',
    array(
        'label'       => __( 'Show Title', 'prime-charity-trust' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//meta Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_meta_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_meta_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_meta_setting]',
    array(
        'label'       => __( 'Show Meta', 'prime-charity-trust' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Content Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_content_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_content_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_content_setting]',
    array(
        'label'       => __( 'Show Content', 'prime-charity-trust' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Button Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_button_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_button_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_post_button_setting]',
    array(
        'label'       => __( 'Show Button', 'prime-charity-trust' ),
        'section'     => 'section_post_setting',
        'type'        => 'checkbox',
    )
);

//Featured Image Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_post_feature_image_setting]', 
    array(
        'default'           => $default['prime_charity_trust_post_feature_image_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);


// Show / Hide Page Title
$wp_customize->add_setting( 'theme_options[show_page_title]', array(
	'default'           => $default['show_page_title'],
	'sanitize_callback' => 'prime_charity_trust_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[show_page_title]', array(
	'label'              => esc_html__( 'Display Page Title', 'prime-charity-trust' ),
	'section'            => 'section_page_title',
	'type'               => 'select',
	'choices' 	         => array(		
		'page-title-enable' 	 => 'Yes',						
		'page-title-disable'     => 'No',
	),	
) );

$wp_customize->add_setting('prime_charity_trust_single_post_align',array(
    'default' => 'left-align',
    'sanitize_callback' => 'prime_charity_trust_sanitize_choices'
));
$wp_customize->add_control('prime_charity_trust_single_post_align',array(
    'type' => 'select',
    'label' => __('Archive Post Alignment','prime-charity-trust'),
    'section' => 'section_post_setting',
    'choices' => array(
            'left-align' => __('Left Alignment','prime-charity-trust'),
            'right-align' => __('Right Alignment','prime-charity-trust'),
            'center-align' => __('Center Alignment','prime-charity-trust'),
        ),
) );

$wp_customize->add_setting('prime_charity_trust_post_meta_order', array(
    'default' => array('featured-image','heading', 'author', 'content','button'),
    'sanitize_callback' => 'prime_charity_trust_sanitize_sortable',
));
$wp_customize->add_control(new Prime_Charity_Trust_Control_Sortable($wp_customize, 'prime_charity_trust_post_meta_order', array(
    'label' => esc_html__('Post Meta Ordering', 'prime-charity-trust'),
    'description' => __('Drag & drop post items to rearrange the ordering ( this control will not function by post format )', 'prime-charity-trust') ,
    'section' => 'section_post_setting',
    'choices' => array(
        'featured-image' => __('featured-image', 'prime-charity-trust') ,
        'heading' => __('heading', 'prime-charity-trust') ,
        'author' => __('author', 'prime-charity-trust') ,
        'content' => __('content', 'prime-charity-trust') ,
        'button' => __('button', 'prime-charity-trust') ,
    ) ,
)));

    // Sidebar Layout
    $wp_customize->add_section('section_sidebar_layout', array(    
    	'title'       => __('Sidebar Layout', 'prime-charity-trust'),
    	'panel'       => 'theme_option_panel'    
    ));

    $wp_customize->add_setting('prime_charity_trust_post_layout_setting', array(
        'default'           => 'right-sidebar',
        'sanitize_callback' => 'sanitize_text_field',
    ));

    $wp_customize->add_control('prime_charity_trust_post_layout_setting', array(
        'label'    => __('Post Column Settings', 'prime-charity-trust'),
        'section'  => 'section_sidebar_layout',
        'settings' => 'prime_charity_trust_post_layout_setting',
        'type'     => 'select',
        'choices'  => array(
            'one-column'   => __('One Column', 'prime-charity-trust'),
            'right-sidebar'   => __('Right Sidebar', 'prime-charity-trust'),
            'left-sidebar'   => __('Left Sidebar', 'prime-charity-trust'),
            'three-column'   => __('Three Columns', 'prime-charity-trust'),
            'four-column'   => __('Four Columns', 'prime-charity-trust'),
        ),
    ));

    $wp_customize->add_setting('prime_charity_trust_archive_pagination_alignment', array(
        'default'           => 'left-align',
        'sanitize_callback' => 'prime_charity_trust_sanitize_pagination_alignment',
    ));

    $wp_customize->add_control('prime_charity_trust_archive_pagination_alignment', array(
        'label'    => __('Pagination Alignment', 'prime-charity-trust'),
        'section'  => 'section_sidebar_layout',
        'settings' => 'prime_charity_trust_archive_pagination_alignment',
        'type'     => 'select',
        'choices' => array(
            'right-align' => __('Right Alignment','prime-charity-trust'),
            'center-align' => __('Center Alignment','prime-charity-trust'),
            'left-align' => __('Left Alignment','prime-charity-trust'),
        ),
    ));

// Excerpt Length
$wp_customize->add_section('section_excerpt_length', 
	array(    
	'title'       => __('Excerpt Length', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

$wp_customize->add_setting( 'theme_options[excerpt_length]', array(
	'default'           => $default['excerpt_length'],
	'sanitize_callback' => 'prime_charity_trust_sanitize_number_range',
) );
$wp_customize->add_control( 'theme_options[excerpt_length]', array(
	'label'       => esc_html__( 'Excerpt Length', 'prime-charity-trust' ),
	'section'     => 'section_excerpt_length',
	'type'        => 'number',
	'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 80px;' ),
) );

// Blog Settings
$wp_customize->add_section('section_blog_setting', 
	array(    
	'title'       => __('Blog / Archive Settings', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

// Blog Button Label
$wp_customize->add_setting( 'theme_options[readmore_text]',
	array(
	'default'           => $default['readmore_text'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'prime_charity_trust_sanitize_textarea_content',
	'transport'         => 'refresh',
	)
);

$wp_customize->add_control( 'theme_options[readmore_text]',
	array(
	'label'    => __( 'Button Label', 'prime-charity-trust' ),
	'section'  => 'section_blog_setting',
	'type'     => 'text',
	)
);
$wp_customize->add_setting('prime_charity_trust_readmore_icon',array(
	'default'	=> 'fas fa-arrow-right',
	'sanitize_callback'	=> 'sanitize_text_field'
));
$wp_customize->add_control(new Prime_Charity_Trust_Changeable_Icon(
    $wp_customize,'prime_charity_trust_readmore_icon',array(
	'label'	=> __('Post Button Icon','prime-charity-trust'),
	'transport' => 'refresh',
	'section'	=> 'section_blog_setting',
	'type'		=> 'icon'
)));
// Footer Setting Section starts
$wp_customize->add_section('section_footer', 
	array(    
	'title'       => __('Footer Setting', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

//Footer Widgets Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_footer_widgtes_setting]', 
    array(
        'default'           => $default['prime_charity_trust_footer_widgtes_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_footer_widgtes_setting]',
    array(
        'label'       => __( 'Show Footer Widgets', 'prime-charity-trust' ),
        'section'     => 'section_footer',
        'type'        => 'checkbox',
    )
);

//Footer Copyright  Setting control
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_footer_setting]', 
    array(
        'default'           => '',
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_footer_setting]',
    array(
        'label'       => __( 'Show Footer Copyright', 'prime-charity-trust' ),
        'section'     => 'section_footer',
        'type'        => 'checkbox',
    )
);

// Setting copyright_text.
$wp_customize->add_setting( 'theme_options[copyright_text]',
	array(
	'default'           => $default['copyright_text'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'sanitize_text_field',
	'transport'         => 'refresh',
	)
);
$wp_customize->add_control( 'theme_options[copyright_text]',
	array(
	'label'    => __( 'Copyright Text', 'prime-charity-trust' ),
	'section'  => 'section_footer',
	'type'     => 'text',
	'priority' => 100,
	)
);
/* Footer Background Color*/
$wp_customize->add_setting(
    'footer_bg_color',
    array(
        'default' => '',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(
    new WP_Customize_Color_Control(
        $wp_customize,
        'footer_bg_color',
        array(
            'label' => __('Footer Widget Area Background Color', 'prime-charity-trust'),
            'section' => 'section_footer',
            'type' => 'color',
        )
    )
);
$wp_customize->add_section('prime_charity_trust_footer_widgets_section', array(
    'title' => __('Footer Widget Columns', 'prime-charity-trust'),
    
));

/** Footer Background Image **/

$wp_customize->add_setting('prime_charity_trust_footer_background_image', array(
    'default' => '',
    'transport' => 'refresh',
    'sanitize_callback' => 'esc_url_raw', // Sanitize as URL
));

$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'prime_charity_trust_footer_background_image', array(
    'label' => __('Footer Background Image', 'prime-charity-trust'),
    'section' => 'section_footer',
    'settings' => 'prime_charity_trust_footer_background_image',
)));

/** Footer Background Image Attachment */
$wp_customize->add_setting('prime_charity_trust_background_attatchment', array(
    'default'           => 'scroll',
    'sanitize_callback' => 'prime_charity_trust_sanitize_choices',
));

$wp_customize->add_control('prime_charity_trust_background_attatchment', array(
    'label'    => __('Footer Background Attachment', 'prime-charity-trust'),
    'section'  => 'section_footer',
    'settings' => 'prime_charity_trust_background_attatchment',
    'type'     => 'select',
    'choices'  => array(
        'fixed' => __('fixed','prime-charity-trust'),
        'scroll' => __('scroll','prime-charity-trust'),
    ),
));

// Add Setting for Footer Widget Columns
$wp_customize->add_setting('prime_charity_trust_footer_widget_columns', array(
    'default' => '4',
    'sanitize_callback' => 'sanitize_text_field',
));

// Add Control for Footer Widget Columns
$wp_customize->add_control('prime_charity_trust_footer_widget_columns', array(
    'label' => __('Number of Columns', 'prime-charity-trust'),
    'section' => 'section_footer',
    'type' => 'select',
    'choices' => array(
    	'0' => __('None', 'prime-charity-trust'),
        '1' => __('1 Column', 'prime-charity-trust'),
        '2' => __('2 Columns', 'prime-charity-trust'),
        '3' => __('3 Columns', 'prime-charity-trust'),
        '4' => __('4 Columns', 'prime-charity-trust'),
    ),
));

// 404 PAGE SETTINGS
$wp_customize->add_section(
    'prime_charity_trust_404_section',
    array(
        'title' => __( '404 Page Settings', 'prime-charity-trust' ),
        'panel'       => 'theme_option_panel'
    )
);

$wp_customize->add_setting('404_page_image', array(
    'default' => '',
    'transport' => 'refresh',
    'sanitize_callback' => 'esc_url_raw', // Sanitize as URL
));

$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, '404_page_image', array(
    'label' => __('404 Page Image', 'prime-charity-trust'),
    'section' => 'prime_charity_trust_404_section',
    'settings' => '404_page_image',
)));

$wp_customize->add_setting('404_pagefirst_header', array(
    'default' => __('404', 'prime-charity-trust'),
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_text_field', // Sanitize as text field
));

$wp_customize->add_control('404_pagefirst_header', array(
    'type' => 'text',
    'label' => __('Heading', 'prime-charity-trust'),
    'section' => 'prime_charity_trust_404_section',
));

// Setting for 404 page header
$wp_customize->add_setting('404_page_header', array(
    'default' => __('Sorry, that page can\'t be found!', 'prime-charity-trust'),
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_text_field', // Sanitize as text field
));

$wp_customize->add_control('404_page_header', array(
    'type' => 'text',
    'label' => __('Heading', 'prime-charity-trust'),
    'section' => 'prime_charity_trust_404_section',
));
// General Setting Section starts
$wp_customize->add_section('section_general_setting', 
	array(    
	'title'       => __('General Setting', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

/** Scroll to top control */
$wp_customize->add_setting( 
    'theme_options[header_donate_scroll_to_top]', 
    array(
        'default'           => $default['header_donate_scroll_to_top'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[header_donate_scroll_to_top]',
    array(
        'label'       => __( 'Show Scroll To Top', 'prime-charity-trust' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);

// Add Setting for Menu Text Transform
$wp_customize->add_setting( 'prime_charity_trust_scroll_top_alignment', array(
    'default'           => 'right-align',
    'sanitize_callback' => 'prime_charity_trust_sanitize_scroll_top_alignment',
) );

// Add Control for Menu Text Transform
$wp_customize->add_control( 'prime_charity_trust_scroll_top_alignment', array(
    'label'    => __( 'Scroll Top Alignment', 'prime-charity-trust' ),
    'section'  => 'section_general_setting',
    'type'     => 'select',
    'choices'  => array(
        'right-align' => __('Right Alignment','prime-charity-trust'),
        'center-align' => __('Center Alignment','prime-charity-trust'),
        'left-align' => __('Left Alignment','prime-charity-trust'),
    ),
) );

/** Scroll to top button shape */
$wp_customize->add_setting('prime_charity_trust_scroll_to_top_radius', array(
    'default'           => 'curved-box',
    'sanitize_callback' => 'prime_charity_trust_sanitize_choices',
));

$wp_customize->add_control('prime_charity_trust_scroll_to_top_radius', array(
    'label'    => __('Scroll Top Button Shape', 'prime-charity-trust'),
    'section'  => 'section_general_setting',
    'settings' => 'prime_charity_trust_scroll_to_top_radius',
    'type'     => 'select',
    'choices'  => array(
        'box'        => __( 'Box', 'prime-charity-trust' ),
        'curved-box' => __( 'Curved Box', 'prime-charity-trust' ),
        'circle'     => __( 'Circle', 'prime-charity-trust' ),
    ),
));

$wp_customize->add_setting('prime_charity_trust_scroll_icon',array(
    'default'   => 'fas fa-arrow-up',
    'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control(new Prime_Charity_Trust_Changeable_Icon(
    $wp_customize,'prime_charity_trust_scroll_icon',array(
    'label' => __('Location Icon','prime-charity-trust'),
    'transport' => 'refresh',
    'section'   => 'section_general_setting',
    'type'      => 'icon'
)));
/** Preloader Setting control */
$wp_customize->add_setting( 
    'theme_options[header_donate_preloader_setting]', 
    array(
        'default'           => $default['header_donate_preloader_setting'],
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[header_donate_preloader_setting]',
    array(
        'label'       => __( 'Show Preloader', 'prime-charity-trust' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);


/** Sticky Header Setting control */
$wp_customize->add_setting( 
    'theme_options[prime_charity_trust_sticky_header]', 
    array(
        'default'           => '',
        'sanitize_callback' => 'prime_charity_trust_sanitize_checkbox',
    ) 
);

$wp_customize->add_control(
    'theme_options[prime_charity_trust_sticky_header]',
    array(
        'label'       => __( 'Show Sticky Header', 'prime-charity-trust' ),
        'section'     => 'section_general_setting',
        'type'        => 'checkbox',
    )
);

// Add Setting for Menu Font Weight
$wp_customize->add_setting( 'menu_font_weight', array(
    'default'           => '400',
    'sanitize_callback' => 'prime_charity_trust_sanitize_font_weight',
) );

// Add Control for Menu Font Weight
$wp_customize->add_control( 'menu_font_weight', array(
    'label'    => __( 'Menu Font Weight', 'prime-charity-trust' ),
    'section'  => 'section_general_setting',
    'type'     => 'select',
    'choices'  => array(
        '100' => __( '100 - Thin', 'prime-charity-trust' ),
        '200' => __( '200 - Extra Light', 'prime-charity-trust' ),
        '300' => __( '300 - Light', 'prime-charity-trust' ),
        '400' => __( '400 - Normal', 'prime-charity-trust' ),
        '500' => __( '500 - Medium', 'prime-charity-trust' ),
        '600' => __( '600 - Semi Bold', 'prime-charity-trust' ),
        '700' => __( '700 - Bold', 'prime-charity-trust' ),
        '800' => __( '800 - Extra Bold', 'prime-charity-trust' ),
        '900' => __( '900 - Black', 'prime-charity-trust' ),
    ),
) );

// Add Setting for Menu Text Transform
$wp_customize->add_setting( 'menu_text_transform', array(
    'default'           => 'uppercase',
    'sanitize_callback' => 'prime_charity_trust_sanitize_text_transform',
) );

// Add Control for Menu Text Transform
$wp_customize->add_control( 'menu_text_transform', array(
    'label'    => __( 'Menu Text Transform', 'prime-charity-trust' ),
    'section'  => 'section_general_setting',
    'type'     => 'select',
    'choices'  => array(
        'none'       => __( 'None', 'prime-charity-trust' ),
        'capitalize' => __( 'Capitalize', 'prime-charity-trust' ),
        'uppercase'  => __( 'Uppercase', 'prime-charity-trust' ),
        'lowercase'  => __( 'Lowercase', 'prime-charity-trust' ),
    ),
) );

$wp_customize->add_setting('prime_charity_trust_menus_style',array(
    'default' => '',
    'sanitize_callback' => 'prime_charity_trust_sanitize_choices',
));
$wp_customize->add_control('prime_charity_trust_menus_style',array(
    'type' => 'select',
    'label' => __('Menu Hover Style','prime-charity-trust'),
    'section' => 'section_general_setting',
    'choices' => array(
     'None' => __('None','prime-charity-trust'),
     'Zoom In' => __('Zoom In','prime-charity-trust'),
  ),
));

$wp_customize->add_setting('prime_charity_trust_theme_width',array(
    'default' => 'full-width',
    'sanitize_callback' => 'prime_charity_trust_sanitize_theme_width'
));
$wp_customize->add_control('prime_charity_trust_theme_width',array(
    'type' => 'select',
    'label' => __('Theme Width Option','prime-charity-trust'),
    'section' => 'section_general_setting',
    'choices' => array(
        'full-width' => __('Fullwidth','prime-charity-trust'),
        'container' => __('Container','prime-charity-trust'),
        'container-fluid' => __('Container Fluid','prime-charity-trust'),
    ),
) );

//Global Color
$wp_customize->add_section(
    'prime_charity_trust_global_color',
    array(
        'priority'   => 1,
        'title' => esc_html__( 'Global Color Settings', 'prime-charity-trust' ),
        'panel' => 'theme_option_panel'  
    )
);

$wp_customize->add_setting('prime_charity_trust_primary_color', array(
    'default'           => '',
    'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'prime_charity_trust_primary_color', array(
    'label'    => __('Theme Primary Color', 'prime-charity-trust'),
    'section'  => 'prime_charity_trust_global_color',
    'settings' => 'prime_charity_trust_primary_color',
))); 

// Woocommerce Setting
$wp_customize->add_section('section_woocommerce_setting', 
	array(    
	'title'       => __('Woocommerce Setting', 'prime-charity-trust'),
	'panel'       => 'theme_option_panel'    
	)
);

// Select No Of Columns
$wp_customize->add_setting( 'theme_options[prime_charity_trust_archive_product_per_row]', array(
	'default'           => $default['prime_charity_trust_archive_product_per_row'],
	'sanitize_callback' => 'prime_charity_trust_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[prime_charity_trust_archive_product_per_row]', array(
	'label'              => esc_html__( 'Select No Of Columns', 'prime-charity-trust' ),
	'section'            => 'section_woocommerce_setting',
	'type'               => 'select',
	'choices' 	         => array(		
		'1' 	  => '1 Column',						
		'2'       => '2 Column',
		'3'       => '3 Column',
		'4'       => '4 Column',
	),	
) );

$wp_customize->add_setting( 
	'theme_options[prime_charity_trust_archive_product_per_page]', 
	array(
		'default'              => $default['prime_charity_trust_archive_product_per_page'],
		'transport' 		   => 'refresh',
		'sanitize_callback'    => 'prime_charity_trust_sanitize_number_absint',
		'sanitize_js_callback' => 'absint',
	)
);

$wp_customize->add_control( 
	'theme_options[prime_charity_trust_archive_product_per_page]',
    array(
		'label'       => esc_html__( 'Product Per Page','prime-charity-trust' ),
		'section'     => 'section_woocommerce_setting',
		'type'        => 'number',
    )
);

// Homepage Static setting and control.
$wp_customize->add_setting( 'theme_options[enable_frontpage_content]', array(
	'default'             => $default['enable_frontpage_content'],
	'sanitize_callback'   => 'prime_charity_trust_sanitize_checkbox',
) );

$wp_customize->add_control( 'theme_options[enable_frontpage_content]', array(
	'label'       	=> __( 'Enable Content', 'prime-charity-trust' ),
	'description' 	=> __( 'Click to enable content on static front page only.', 'prime-charity-trust' ),
	'section'     	=> 'static_front_page',
	'type'        	=> 'checkbox',
) );

// Show / Hide Frontpage Content
$wp_customize->add_setting( 'theme_options[enable_frontpage_content]', array(
	'default'             => $default['enable_frontpage_content'],
	'sanitize_callback'   => 'prime_charity_trust_sanitize_checkbox',
) );

$wp_customize->add_control( 'theme_options[enable_frontpage_content]', array(
	'label'       	=> esc_html__( 'Enable Homepage Content', 'prime-charity-trust' ),
	'description' 	=> esc_html__( 'Enable content on A static page.', 'prime-charity-trust' ),
	'section'     	=> 'static_front_page',
	'type'        	=> 'checkbox',
) );

// Show / Hide Header Image
$wp_customize->add_setting( 'theme_options[show_header_image]', array(
	'default'           => $default['show_header_image'],
	'sanitize_callback' => 'prime_charity_trust_sanitize_select',
) );

$wp_customize->add_control( 'theme_options[show_header_image]', array(
	'label'              => esc_html__( 'Display Header Image', 'prime-charity-trust' ),
	'section'            => 'header_image',
	'type'               => 'select',
	'choices' 	         => array(		
		'header-image-enable' 	   => 'Yes',						
		'header-image-disable'     => 'No',
	),	
) );