<?php
/**
 * lz-charity-welfare: Customizer
 *
 * @subpackage lz-charity-welfare
 * @since 1.0
 */

function lz_charity_welfare_customize_register( $wp_customize ) {

	$wp_customize->add_setting('lz_charity_welfare_logo_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_size',array(
		'type' => 'range',
		'description' => __('Logo Size (0-100%)','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_padding',array(
		'label' => __('Logo Padding','lz-charity-welfare'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('lz_charity_welfare_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_logo_right_padding',array(
		'default' => '',
		'sanitize_callback' => 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_checkbox'
	));
	$wp_customize->add_control('lz_charity_welfare_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','lz-charity-welfare'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('lz_charity_welfare_site_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_site_title_font_size',array(
		'type' => 'number',
		'label' => __('Site Title Font Size','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('lz_charity_welfare_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_checkbox'
	));
	$wp_customize->add_control('lz_charity_welfare_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','lz-charity-welfare'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('lz_charity_welfare_site_tagline_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_site_tagline_font_size',array(
		'type' => 'number',
		'label' => __('Site Tagline Font Size','lz-charity-welfare'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_panel( 'lz_charity_welfare_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'lz-charity-welfare' ),
		'description' => __( 'Description of what this panel does.', 'lz-charity-welfare' ),
	) );

	$wp_customize->add_section( 'lz_charity_welfare_theme_options_section', array(
    	'title'      => __( 'General Settings', 'lz-charity-welfare' ),
		'priority'   => 30,
		'panel' => 'lz_charity_welfare_panel_id'
	) );

	// Add Settings and Controls for Layout
	$wp_customize->add_setting('lz_charity_welfare_theme_options',array(
     	'default' => 'Right Sidebar',
     	'sanitize_callback' => 'lz_charity_welfare_sanitize_choices'	        
	));

	$wp_customize->add_control('lz_charity_welfare_theme_options',array(
		'type' => 'radio',
		'label' => __('Do you want this section','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','lz-charity-welfare'),
		   'Right Sidebar' => __('Right Sidebar','lz-charity-welfare'),
		   'One Column' => __('One Column','lz-charity-welfare'),
		   'Three Columns' => __('Three Columns','lz-charity-welfare'),
		   'Four Columns' => __('Four Columns','lz-charity-welfare'),
		   'Grid Layout' => __('Grid Layout','lz-charity-welfare')
		),
	));

	$wp_customize->add_setting( 'lz_charity_welfare_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'lz_charity_welfare_sanitize_choices'
	));
	
	$wp_customize->add_control( 'lz_charity_welfare_boxfull_width', array(
		'label'    => __( 'Section Width', 'lz-charity-welfare' ),
		'section'  => 'lz_charity_welfare_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'lz-charity-welfare'),
			'container-fluid' => __('Full Width', 'lz-charity-welfare'),
			'none' => __('None', 'lz-charity-welfare')
		),
	));

	$wp_customize->add_setting( 'lz_charity_welfare_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'lz_charity_welfare_sanitize_choices'
	));
	$wp_customize->add_control( 'lz_charity_welfare_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'lz-charity-welfare' ),
		'section'  => 'lz_charity_welfare_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'lz-charity-welfare'),
			'fadeInUp' => __('fadeInUp', 'lz-charity-welfare'),
			'zoomIn'    => __('zoomIn', 'lz-charity-welfare'),
			'None'    => __('None', 'lz-charity-welfare')
		),
	));

	// topbar
	$wp_customize->add_section('lz_charity_welfare_topbar_header',array(
		'title'	=> __('Social Icons','lz-charity-welfare'),
		'description'	=> __('<b>Note : </b>Add Header Content here','lz-charity-welfare'),
		'priority'	=> null,
		'panel' => 'lz_charity_welfare_panel_id',
	));

	$wp_customize->add_setting('lz_charity_welfare_facebook_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('lz_charity_welfare_facebook_url',array(
		'label'	=> __('Add Facebook link','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_topbar_header',
		'setting'	=> 'lz_charity_welfare_facebook_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('lz_charity_welfare_twitter_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('lz_charity_welfare_twitter_url',array(
		'label'	=> __('Add Twitter link','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_topbar_header',
		'setting'	=> 'lz_charity_welfare_twitter_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('lz_charity_welfare_linkedin_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('lz_charity_welfare_linkedin_url',array(
		'label'	=> __('Add Linkedin link','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_topbar_header',
		'setting'	=> 'lz_charity_welfare_linkedin_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('lz_charity_welfare_insta_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('lz_charity_welfare_insta_url',array(
		'label'	=> __('Add Instagram link','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_topbar_header',
		'setting'	=> 'lz_charity_welfare_insta_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting( 'lz_charity_welfare_social_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_social_color', array(
		'label' => 'Icon Color',
		'section' => 'lz_charity_welfare_topbar_header',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_socialhvr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_socialhvr_color', array(
		'label' => 'Icon Hover Color',
		'section' => 'lz_charity_welfare_topbar_header',
	)));


	// Contact Details
	$wp_customize->add_section( 'lz_charity_welfare_contact_details', array(
    	'title'      => __( 'Header Contact Details', 'lz-charity-welfare' ),
		'priority'   => null,
		'panel' => 'lz_charity_welfare_panel_id'
	) );

	$wp_customize->add_setting('lz_charity_welfare_hide_show_topbar',array(
    	'default' => false,
    	'sanitize_callback'	=> 'lz_charity_welfare_sanitize_checkbox'
	));
	$wp_customize->add_control('lz_charity_welfare_hide_show_topbar',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Topbar','lz-charity-welfare'),
   	'section' => 'lz_charity_welfare_contact_details',
	));

	$wp_customize->add_setting('lz_charity_welfare_call',array(
		'default'=> '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_phone_number'
	));	
	$wp_customize->add_control('lz_charity_welfare_call',array(
		'label'	=> __('Contact Number','lz-charity-welfare'),
		'section'=> 'lz_charity_welfare_contact_details',
		'setting'=> 'lz_charity_welfare_call',
		'type'=> 'text'
	));

	$wp_customize->add_setting('lz_charity_welfare_donate_btn_txt',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('lz_charity_welfare_donate_btn_txt',array(
		'label'	=> __('Add Donate Button Text','lz-charity-welfare'),
		'section'=> 'lz_charity_welfare_contact_details',
		'setting'=> 'lz_charity_welfare_mail',
		'type'=> 'text'
	));	

	$wp_customize->add_setting('lz_charity_welfare_donate_btn_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('lz_charity_welfare_donate_btn_url',array(
		'label'	=> __('Add Donate Button link','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_contact_details',
		'setting' => 'lz_charity_welfare_donate_btn_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting( 'lz_charity_welfare_number_color', array(
	'default' => '',
	'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_number_color', array(
		'label' => 'Number Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_hdrbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_hdrbtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_hdrbtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_hdrbtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_headermenu_color', array(
	'default' => '',
	'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_headermenu_color', array(
		'label' => 'Header Menus Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_headermenuhover_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_headermenuhover_color', array(
		'label' => 'Header Menus Hover Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_header_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_header_color', array(
		'label' => 'Header Background Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_headerbdr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_headerbdr_color', array(
		'label' => 'Header Border Color',
		'section' => 'lz_charity_welfare_contact_details',
	)));

	//home page slider
	$wp_customize->add_section( 'lz_charity_welfare_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'lz-charity-welfare' ),
		'priority'   => null,
		'panel' => 'lz_charity_welfare_panel_id'
	) );

	$wp_customize->add_setting('lz_charity_welfare_slider_hide_show',array(
    	'default' => false,
    	'sanitize_callback'	=> 'lz_charity_welfare_sanitize_checkbox'
	));
	$wp_customize->add_control('lz_charity_welfare_slider_hide_show',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide slider','lz-charity-welfare'),
   	'section' => 'lz_charity_welfare_slider_section',
	));

	$wp_customize->add_setting( 'lz_charity_welfare_slider_effect', array(
		'default'           => '',
		'sanitize_callback' => 'lz_charity_welfare_sanitize_choices'
	));
	$wp_customize->add_control( 'lz_charity_welfare_slider_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'lz-charity-welfare' ),
		'section'  => 'lz_charity_welfare_slider_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'lz-charity-welfare'),
			'bounceInRight' => __('bounceInRight', 'lz-charity-welfare'),
			'bounceInUp'    => __('bounceInUp', 'lz-charity-welfare'),
			'bounceInDown'    => __('bounceInDown', 'lz-charity-welfare'),
			'zoomIn'  => __('zoomIn', 'lz-charity-welfare'),
			'zoomOut' => __('zoomOut', 'lz-charity-welfare'),
			'fadeInDown'    => __('fadeInDown', 'lz-charity-welfare'),
			'fadeInUp'    => __('fadeInUp', 'lz-charity-welfare'),
			'fadeInLeft'  => __('fadeInLeft', 'lz-charity-welfare'),
			'fadeInRight' => __('fadeInRight', 'lz-charity-welfare'),
			'flip-up'    => __('flip-up', 'lz-charity-welfare'),
			'none'    => __('none', 'lz-charity-welfare')
		),
	));

	for ( $count = 1; $count <= 4; $count++ ) {
		$wp_customize->add_setting( 'lz_charity_welfare_slider' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'lz_charity_welfare_sanitize_dropdown_pages'
		) );
		$wp_customize->add_control( 'lz_charity_welfare_slider' . $count, array(
			'label' => __( 'Select Slide Image Page', 'lz-charity-welfare' ),
			'description' => __('Image Size (625px x 600px)', 'lz-charity-welfare' ),
			'section' => 'lz_charity_welfare_slider_section',
			'type' => 'dropdown-pages'
		) );
	}

	$wp_customize->add_setting('lz_charity_welfare_slider_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_slider_title_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_slider_section',
	));

	$wp_customize->add_setting('lz_charity_welfare_slider_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_slider_text_font_size',array(
		'type' => 'number',
		'label' => __('Text Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_slider_section',
	));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_slider_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_slider_color', array(
		'label' => 'Title Color',
		'section' => 'lz_charity_welfare_slider_section',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_slidertext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_slidertext_color', array(
		'label' => 'Text Color',
		'section' => 'lz_charity_welfare_slider_section',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_sliderbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_sliderbtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'lz_charity_welfare_slider_section',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_sliderbtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_sliderbtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'lz_charity_welfare_slider_section',
	)));

	//	Our Service
	$wp_customize->add_section('lz_charity_welfare_service',array(
		'title'	=> __('Our Services','lz-charity-welfare'),
		'description'=> __('This section will appear below the slider.','lz-charity-welfare'),
		'panel' => 'lz_charity_welfare_panel_id',
	));

	$wp_customize->add_setting('lz_charity_welfare_services_small_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('lz_charity_welfare_services_small_title',array(
		'label'	=> __('Section Small Title','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_service',
		'setting'	=> 'lz_charity_welfare_services_small_title',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('lz_charity_welfare_our_services_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('lz_charity_welfare_our_services_title',array(
		'label'	=> __('Section Title','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_service',
		'setting'	=> 'lz_charity_welfare_our_services_title',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('lz_charity_welfare_our_services_smalltitle_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_our_services_smalltitle_font_size',array(
		'type' => 'number',
		'label' => __('Section Small Title Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

	$wp_customize->add_setting('lz_charity_welfare_our_services_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_our_services_title_font_size',array(
		'type' => 'number',
		'label' => __('Section Title Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	foreach($categories as $category){
	if($i==0){
	$default = $category->slug;
	$i++;
	}
	$cats[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('lz_charity_welfare_category_setting',array(
		'default'	=> 'select',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control('lz_charity_welfare_category_setting',array(
		'type'    => 'select',
		'choices' => $cats,
		'label' => __('Select Category To Display Post','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

	$wp_customize->add_setting('lz_charity_welfare_our_services_post_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_our_services_post_title_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

	$wp_customize->add_setting('lz_charity_welfare_our_services_post_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_our_services_post_text_font_size',array(
		'type' => 'number',
		'label' => __('Text Font Size','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

	$wp_customize->add_setting('lz_charity_welfare_service_section_padding',array(
      'default' => '',
      'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_service_section_padding',array(
		'type' => 'number',
		'label' => __('Section Top Bottom Padding','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

   	$wp_customize->add_setting('lz_charity_welfare_img_hight',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
	));
	$wp_customize->add_control('lz_charity_welfare_img_hight',array(
		'type' => 'number',
		'label' => __('Image Hight','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_service',
	));

  	$wp_customize->add_setting( 'lz_charity_welfare_donate_service_smalltitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_service_smalltitle_color', array(
		'label' => 'Small Title Color',
		'section' => 'lz_charity_welfare_service',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_service_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_service_title_color', array(
		'label' => 'Title Color',
		'section' => 'lz_charity_welfare_service',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_service_imgbdr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_service_imgbdr_color', array(
		'label' => 'Image Border Color',
		'section' => 'lz_charity_welfare_service',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_service_posttitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_service_posttitle_color', array(
		'label' => 'Post Title Color',
		'section' => 'lz_charity_welfare_service',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_donate_service_posttext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_donate_service_posttext_color', array(
		'label' => 'Post Text Color',
		'section' => 'lz_charity_welfare_service',
	)));

	//Footer
 	$wp_customize->add_section( 'lz_charity_welfare_footer', array(
    	'title'      => __( 'Footer Text', 'lz-charity-welfare' ),
		'priority'   => null,
		'panel' => 'lz_charity_welfare_panel_id'
	) );

	$wp_customize->add_setting('lz_charity_welfare_show_back_totop',array(
 		'default' => true,
   	'sanitize_callback' => 'lz_charity_welfare_sanitize_checkbox'
	));
	$wp_customize->add_control('lz_charity_welfare_show_back_totop',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Back to Top','lz-charity-welfare'),
   	'section' => 'lz_charity_welfare_footer'
	));
 
 	$wp_customize->add_setting('lz_charity_welfare_footer_copy',array(
		'default'	=> 'Charity WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('lz_charity_welfare_footer_copy',array(
		'label'	=> __('Footer Text','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_footer',
		'setting'	=> 'lz_charity_welfare_footer_copy',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('lz_charity_welfare_footer_copylink',array(
		'default'	=> 'https://www.luzuk.com/themes/free-charity-wordpress-theme/',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('lz_charity_welfare_footer_copylink',array(
		'label'	=> __('Footer Link','lz-charity-welfare'),
		'section'	=> 'lz_charity_welfare_footer',
		'setting'	=> 'lz_charity_welfare_footer_copylink',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('lz_charity_welfare_copyright_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'lz_charity_welfare_sanitize_float'
 	));
 	$wp_customize->add_control('lz_charity_welfare_copyright_padding',array(
		'type' => 'number',
		'label' => __('Copyright Top Bottom Padding','lz-charity-welfare'),
		'section' => 'lz_charity_welfare_footer',
	));

	$wp_customize->add_setting( 'lz_charity_welfare_copyright_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_copyright_color', array(
		'label' => 'Copyright Text Color',
		'section' => 'lz_charity_welfare_footer',
	)));

	$wp_customize->add_setting( 'lz_charity_welfare_copyrightbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lz_charity_welfare_copyrightbg_color', array(
		'label' => 'Copyright Bg Color',
		'section' => 'lz_charity_welfare_footer',
	)));

	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'lz_charity_welfare_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'lz_charity_welfare_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'lz_charity_welfare_customize_register' );

function lz_charity_welfare_customize_partial_blogname() {
	bloginfo( 'name' );
}

function lz_charity_welfare_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

function lz_charity_welfare_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

function lz_charity_welfare_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class LZ_Charity_Welfare_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $instance = null;

		if ( is_null( $instance ) ) {
			$instance = new self;
			$instance->setup_actions();
		}

		return $instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $manager
	 * @return void
	 */
	public function sections( $manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );

		// Register custom section types.
		$manager->register_section_type( 'LZ_Charity_Welfare_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section(
			new LZ_Charity_Welfare_Customize_Section_Pro(
				$manager,
				'lz_charity_welfare_example_1',
				array(
					'priority' => 9,
					'title'    => esc_html__( 'LZ Charity Pro', 'lz-charity-welfare' ),
					'pro_text' => esc_html__( 'Go Pro','lz-charity-welfare' ),
					'pro_url'  => esc_url( 'https://www.luzuk.com/product/charity-wordpress-theme/' ),
				)
			)
		);
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'lz-charity-welfare-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'lz-charity-welfare-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
LZ_Charity_Welfare_Customize::get_instance();