<?php   
$lz_fitness_categories = get_categories(array('hide_empty' => 0));
foreach ($lz_fitness_categories as $lz_fitness_category) {
	$lz_fitness_cat[$lz_fitness_category->term_id] = $lz_fitness_category->cat_name;
}
/****************************/
// START BLOG SECTION FOR HOME PAGE
/*============BLOG PANEL============*/
$wp_customize->add_section(
	'blog_section',
	array(
		'title' => __( 'Blog Section', 'Luzuk' ),
		'panel' => 'lz_fitness_premium_home_panel',
     	//'priority' => '50',
	)
);
$wp_customize->add_setting(
	'blog_section_disable',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new lz_fitness_Switch_Control(
		$wp_customize,
		'blog_section_disable',
		array(
			'settings'      => 'blog_section_disable',
			'section'       => 'blog_section',
			'label'         => __( 'Disable Section', 'Luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'Luzuk' ),
				'off' => __( 'No', 'Luzuk' )
			)   
		)
	)
);

lzCustomLable($wp_customize, 'BlogSectionbgmanageSetting', 'blog_section', 'Background Manager For Complete Section:');

backgroundManager($wp_customize, 'blog', 'blog_section', $color='#ffffff');


lzCustomLable($wp_customize, 'BlogSectionblogbxSetting', 'blog_section', 'Background Manager For Blog Box:');


$wp_customize->add_setting(
    'blog_boxbgss_color_one', array(
        'default'           => '#fefefe',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blog_boxbgss_color_one',array(
            'settings'      => 'blog_boxbgss_color_one',
            'section'       => 'blog_section',
            'label'         => __( 'Blog Box Background Color One ', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'blog_boxbgss_color_two', array(
        'default'           => '#f9f9f9',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blog_boxbgss_color_two',array(
            'settings'      => 'blog_boxbgss_color_two',
            'section'       => 'blog_section',
            'label'         => __( 'Blog Box Background Color Two ', 'Luzuk Premium' ),
        )
    )
); 



lzCustomLable($wp_customize, 'BlogSectionPaddingSetting', 'blog_section', 'Section Top & Bottom Padding:');

$wp_customize->add_setting(
    'blogTpadding', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '9em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'blogTpadding',
    array(
        'settings'      => 'blogTpadding',
        'section'       => 'blog_section',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'blogBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '5em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'blogBpadding',
    array(
        'settings'      => 'blogBpadding',
        'section'       => 'blog_section',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'Luzuk' )
    )
);

$wp_customize->add_setting(
	'blog_title_subtitle_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'blog_title_subtitle_heading',
		array(
			'settings'      => 'blog_title_subtitle_heading',
			'section'       => 'blog_section',
			'label'         => __( 'Section Title, Sub Title & Section Text', 'Luzuk' ),
		)
	)
);
$wp_customize->add_setting(
	'blog_area_subtitle',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'HEADING HERE', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'blog_area_subtitle',
	array(
		'settings'      => 'blog_area_subtitle',
		'section'       => 'blog_section',
		'type'          => 'text',
		'label'         => __( 'Add Section Sub Title Here:', 'Luzuk' )
	)
);


addColorPalatOption($wp_customize, 'blog_sectionsubsttlColor', 'blog_section', 'Select Section Sub Title color', '#649df4');


$wp_customize->add_setting(
	'blog_area_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Latest <span>Post</span>', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'blog_area_title',
	array(
		'settings'      => 'blog_area_title',
		'section'       => 'blog_section',
		'type'          => 'text',
		'label'         => __( 'Add Section Title Here:', 'Luzuk' )
	)
);
addColorPalatOption($wp_customize, 'blog_sectionTtlColor', 'blog_section', 'Select Section Title Color', '#212121');
addColorPalatOption($wp_customize, 'blog_sectionTtlBrssColor', 'blog_section', 'Select Section Title Border Color', '#50b2f1');


$wp_customize->add_setting(
	'blog_area_content',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula..', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'blog_area_content',
	array(
		'settings'      => 'blog_area_content',
		'section'       => 'blog_section',
		'type'          => 'textarea',
		'label'         => __( 'Add Section Content Here:', 'Luzuk' )
	)
);

addColorPalatOption($wp_customize, 'blog_sectionContentColor', 'blog_section', 'Select Section Content Color', '#3f3f3f');


$wp_customize->add_setting(
	'blog_post_count',
	array(
		'default'           => '18',
		'sanitize_callback' => 'lz_fitness_sanitize_choices'
	)
);
$wp_customize->add_control(
	new lz_fitness_Dropdown_Chooser(
		$wp_customize,
		'blog_post_count',
		array(
			'settings'      => 'blog_post_count',
			'section'       => 'blog_section',
			'label'         => __( 'Number of Posts to show', 'Luzuk' ),
			'choices'       => $post_count_choice
		)
	)
);
$wp_customize->add_setting(
	'blog_cat_exclude',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Checkbox_Multiple(
		$wp_customize,
		'blog_cat_exclude',
		array(
			'label' => __('Exclude Category from Blog Posts', 'Luzuk'),
			'section' => 'blog_section',
			'settings' => 'blog_cat_exclude',
			'choices' => $lz_fitness_cat
		)
	)
);
// END BLOG SECTION FOR HOME PAGE
/****************************/


// CREATING A BLOG SECTION IN CUSTOMIZER FOR BLOG PAGES
$wp_customize->add_section(
	'lz_fitness_premium_blog_section',
	array(
		'title' => __( 'Blog Page Settings', 'Luzuk' ),
        // 'panel' => 'lz_fitness_premium_home_panel'
		'priority' =>19
	)
);

$wp_customize->add_setting('lz_fitness_blog_categories_settings', array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control('lz_fitness_blog_categories_settings', array(
	'settings' => 'lz_fitness_blog_categories_settings',
	'label'    => __('Posts on Blog Page', 'Luzuk'),
	'section'  => 'lz_fitness_premium_blog_section',
	'type'     => 'radio',
	'choices'  => array(
		'0' => __('Excerpts','Luzuk'),
		'1' => __('Full Posts','Luzuk'),
	),
));
// ADDING THE CATEGORY TO SELECT
$wp_customize->add_setting('lz_fitness_blog_categories', array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
	new lz_fitness_Customize_Checkbox_Multiple(
		$wp_customize,
		'lz_fitness_blog_categories',
		array(
			'label' => __('Exclude Category from Blog Posts', 'Luzuk'),
			'section' => 'lz_fitness_premium_blog_section',
			'settings' => 'lz_fitness_blog_categories',
			'choices' => $lz_fitness_cat
		)
	)
);

addColorPalatOption($wp_customize, 'blogsection_CategoryTextColor', 'blog_section', 'Category Text Color', '#ffffff');

$wp_customize->add_setting(
    'blogsection_CategoryBackground_color_one', array(
        'default'           => '#788af8',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogsection_CategoryBackground_color_one',array(
            'settings'      => 'blogsection_CategoryBackground_color_one',
            'section'       => 'blog_section',
            'label'         => __( 'Category Box Background Color One ', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'blogsection_CategoryBackground_color_two', array(
        'default'           => '#54adf2',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogsection_CategoryBackground_color_two',array(
            'settings'      => 'blogsection_CategoryBackground_color_two',
            'section'       => 'blog_section',
            'label'         => __( 'Category Box Background Color Two ', 'Luzuk Premium' ),
        )
    )
); 

$wp_customize->add_setting(
    'blogsection_CategoryBackground_color_three', array(
        'default'           => '#6d7bf5',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogsection_CategoryBackground_color_three',array(
            'settings'      => 'blogsection_CategoryBackground_color_three',
            'section'       => 'blog_section',
            'label'         => __( 'Category Box Hover Background Color', 'Luzuk Premium' ),
        )
    )
); 




addColorPalatOption($wp_customize, 'blogsection_AuthorDateIconColor', 'blog_section', 'Author & Date Icon Color', '#ffffff');

addColorPalatOption($wp_customize, 'blogsection_AuthorDateTextColor', 'blog_section', 'Author & Date Text Color', '#ffffff');
addColorPalatOption($wp_customize, 'blogsection_BlogTitleColor', 'blog_section', 'Blog Title Color', '#ffffff');
addColorPalatOption($wp_customize, 'blogsection_blogcontentColor', 'blog_section', 'Blog Hover Text Color', '#ffffff');

lzCustomLable($wp_customize, 'Blog_BttondTextdisplay', 'blog_section', 'Button Icon Display & Button Icon Colors Setting:');
// to show & hide another button
$wp_customize->add_setting( 'blog_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'blog_button_display', array( 'label' => 'Button Icon Display', 'section' => 'blog_section', 'settings' => 'blog_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button Icon', 'hide' => 'Hide Button Icon', ), ) ); 
// end to show & hide button

addColorPalatOption($wp_customize, 'blogmain_ButtonIconColor', 'blog_section', 'Button Icon Color', '#659ef5');
addColorPalatOption($wp_customize, 'blogmain_ButtonIconHoverColor', 'blog_section', 'Button Hover Icon color', '#ffffff');


$wp_customize->add_setting(
    'blogmain_ButtonBackground_color_one', array(
        'default'           => '#ffffff',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogmain_ButtonBackground_color_one',array(
            'settings'      => 'blogmain_ButtonBackground_color_one',
            'section'       => 'blog_section',
            'label'         => __( 'Button Background Color One ', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'blogmain_ButtonBackground_color_two', array(
        'default'           => '#ffffff',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogmain_ButtonBackground_color_two',array(
            'settings'      => 'blogmain_ButtonBackground_color_two',
            'section'       => 'blog_section',
            'label'         => __( 'Button Background Color Two ', 'Luzuk Premium' ),
        )
    )
); 

$wp_customize->add_setting(
    'blogmain_ButtonBackground_color_three', array(
        'default'           => '#293263',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'blogmain_ButtonBackground_color_three',array(
            'settings'      => 'blogmain_ButtonBackground_color_three',
            'section'       => 'blog_section',
            'label'         => __( 'Button Hover Background Color', 'Luzuk Premium' ),
        )
    )
); 

$wp_customize->add_setting(
    'Blog_PageImageOverlay_color_one', array(
        'default'           => '#7877ef87',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Blog_PageImageOverlay_color_one',array(
            'settings'      => 'Blog_PageImageOverlay_color_one',
            'section'       => 'blog_section',
            'label'         => __( 'Blog Image Overlay Background Color', 'Luzuk Premium' ),
        )
    )
);
$wp_customize->add_setting(
    'Blog_PageImageHoverOverlay_color_one', array(
        'default'           => '#50b2f3',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Blog_PageImageHoverOverlay_color_one',array(
            'settings'      => 'Blog_PageImageHoverOverlay_color_one',
            'section'       => 'blog_section',
            'label'         => __( 'Blog Image Hover Overlay Background Color One', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'Blog_PageImageHoverOverlay_color_two', array(
        'default'           => '#7989f8',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Blog_PageImageHoverOverlay_color_two',array(
            'settings'      => 'Blog_PageImageHoverOverlay_color_two',
            'section'       => 'blog_section',
            'label'         => __( 'Blog Image Hover Overlay Background Color Two', 'Luzuk Premium' ),
        )
    )
);



lzCustomLable($wp_customize, 'blogimgheightsetSetting', 'blog_section', 'Set Blog Image Height:');

$wp_customize->add_setting(
    'blogboxImgHeight', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '450px', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'blogboxImgHeight',
    array(
        'settings'      => 'blogboxImgHeight',
        'section'       => 'blog_section',
        'type'          => 'text',
        'label'         => __( 'Height:', 'Luzuk' )
    )
);