<?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;
}

$wp_customize->add_section(
	'singlepostblog_section',
	array(
		'title' => __( 'Single Posts Section', 'Luzuk' ),
		'panel' => 'lz_fitness_premium_home_panel',
     	//'priority' => '50',
	)
);
$wp_customize->add_setting(
	'singlepostblog_section_disable',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new lz_fitness_Switch_Control(
		$wp_customize,
		'singlepostblog_section_disable',
		array(
			'settings'      => 'singlepostblog_section_disable',
			'section'       => 'singlepostblog_section',
			'label'         => __( 'Disable Section', 'Luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'Luzuk' ),
				'off' => __( 'No', 'Luzuk' )
			)   
		)
	)
);
backgroundManager($wp_customize, 'singlepost', 'singlepostblog_section', $color='#f7f7f7');



lzCustomLable($wp_customize, 'sec_singleblogsection_padding', 'singlepostblog_section', 'Set Padding For Section:');

$wp_customize->add_setting(
    'sec_singlesectionTpadding', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '6em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_singlesectionTpadding',
    array(
        'settings'      => 'sec_singlesectionTpadding',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_singlesectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '6em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_singlesectionBpadding',
    array(
        'settings'      => 'sec_singlesectionBpadding',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'Luzuk' )
    )
);

$wp_customize->add_setting(
    'sec_singlesectionLpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_singlesectionLpadding',
    array(
        'settings'      => 'sec_singlesectionLpadding',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Left Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_singlesectionRpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_singlesectionRpadding',
    array(
        'settings'      => 'sec_singlesectionRpadding',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Right Padding', 'Luzuk' )
    )
);


lzCustomLable($wp_customize, 'single_blopostimagesresset', 'singlepostblog_section', 'Note: Set posts images of same resolution');
  
// $wp_customize->add_setting(
// 	'luzuk_singlepostblog_post_count',
// 	array(
// 		'default'           => '3',
// 		'sanitize_callback' => 'lz_fitness_sanitize_choices'
// 	)
// );
// $wp_customize->add_control(
// 	new lz_fitness_Dropdown_Chooser(
// 		$wp_customize,
// 		'luzuk_singlepostblog_post_count',
// 		array(
// 			'settings'      => 'luzuk_singlepostblog_post_count',
// 			'section'       => 'singlepostblog_section',
// 			'label'         => __( 'Number of Posts to Show', 'Luzuk' ),
// 			'choices'       => $lz_fitness_post_count_choice
// 		)
// 	)
// );
$wp_customize->add_setting(
	'luzuk_singlepostblog_cat_exclude',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Checkbox_Multiple(
		$wp_customize,
		'luzuk_singlepostblog_cat_exclude',
		array(
			'label' => __('Exclude Category from Blog Posts', 'Luzuk'),
			'section' => 'singlepostblog_section',
			'settings' => 'luzuk_singlepostblog_cat_exclude',
			'choices' => $lz_fitness_cat
		)
	)
);

// 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
		)
	)
);


lzCustomLable($wp_customize, 'sec_Businessblogsection_opacity', 'singlepostblog_section', 'Set Posts Image Hover Overlay Opacity & Its Background Color:');

$wp_customize->add_setting(
    'sec_singlesectionOpacity', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0.4', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_singlesectionOpacity',
    array(
        'settings'      => 'sec_singlesectionOpacity',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Opacity', 'Luzuk' )
    )
);
addColorPalatOption($wp_customize, 'SingleBlog_ImgHvrOverBgsColor', 'singlepostblog_section', 'Posts Hover Overlay Background color', '#000000');

lzCustomLable($wp_customize, 'sec_Singleblogsection_OtherC', 'singlepostblog_section', 'Other Colors:');


addColorPalatOption($wp_customize, 'SingleBlog_SectionTitleColor', 'singlepostblog_section', 'Posts Title color', '#2b2b2b');
addColorPalatOption($wp_customize, 'SingleBlog_TitleHvrColor', 'singlepostblog_section', 'Posts Title Hover color', '#7d52fc');

addColorPalatOption($wp_customize, 'SingleBlog_SectionTitleBorderColor', 'singlepostblog_section', 'Posts Title Border color', '#7d52fc');

addColorPalatOption($wp_customize, 'SingleBlog_CatTextColor', 'singlepostblog_section', 'Posts Category Text color', '#ffffff');
addColorPalatOption($wp_customize, 'SingleBlog_Cat1BgColor', 'singlepostblog_section', 'Category Text Background color 1', '#dc3d66');
addColorPalatOption($wp_customize, 'SingleBlog_Cat2BgColor', 'singlepostblog_section', 'Category Text Background color 2', '#7d51fc');
addColorPalatOption($wp_customize, 'SingleBlog_Cat3BgColor', 'singlepostblog_section', 'Category Text Background color 3', '#f8b739');
addColorPalatOption($wp_customize, 'SingleBlog_Cat4BgColor', 'singlepostblog_section', 'Category Text Background color 4', '#296170');

addColorPalatOption($wp_customize, 'SingleBlog_DateIconTxtColor', 'singlepostblog_section', 'Date, Comment Icon & Text color', '#9b9b9b');
addColorPalatOption($wp_customize, 'SingleBlog_ContentColor', 'singlepostblog_section', 'Content color', '#646464');





lzCustomLable($wp_customize, 'blogbutn_text_button_display', 'singlepostblog_section', 'Button Display & Text 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 Display', 'section' => 'singlepostblog_section', 'settings' => 'blog_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) ); 
// end to show & hide button

$wp_customize->add_setting(
    'blogbutn_text',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Read More' )
    )
);
$wp_customize->add_control(
    'blogbutn_text',
    array(
        'settings'      => 'blogbutn_text',
        'section'       => 'singlepostblog_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'Unbox' )
    )
);


addColorPalatOption($wp_customize, 'SingleBlog_BtntxtndarrowColor', 'singlepostblog_section', 'Button Text & Arrow color', '#232323');
addColorPalatOption($wp_customize, 'SingleBlog_BtntxtndarrowHvrsColor', 'singlepostblog_section', 'Button Text & Arrow Hover color', '#764fe8');
