<?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(
	'bussinessblog_section',
	array(
		'title' => __( 'Business Posts Section', 'Luzuk' ),
		'panel' => 'lz_fitness_premium_home_panel',
     	//'priority' => '50',
	)
);
$wp_customize->add_setting(
	'bussinessblog_section_disable',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new lz_fitness_Switch_Control(
		$wp_customize,
		'bussinessblog_section_disable',
		array(
			'settings'      => 'bussinessblog_section_disable',
			'section'       => 'bussinessblog_section',
			'label'         => __( 'Disable Section', 'Luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'Luzuk' ),
				'off' => __( 'No', 'Luzuk' )
			)   
		)
	)
);
backgroundManager($wp_customize, 'bussinesspost', 'bussinessblog_section', $color='#f7f7f7');



lzCustomLable($wp_customize, 'sec_blogsection_padding', 'bussinessblog_section', 'Set Padding For Section:');

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

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


$wp_customize->add_setting(
	'bussiness_title_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'bussiness_title_heading',
		array(
			'settings'      => 'bussiness_title_heading',
			'section'       => 'bussinessblog_section',
			'label'         => __( 'Section Title', 'Luzuk' ),
		)
	)
);
$wp_customize->add_setting(
	'bussiness_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Business', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'bussiness_title',
	array(
		'settings'      => 'bussiness_title',
		'section'       => 'bussinessblog_section',
		'type'          => 'text',
		'label'         => __( 'Add Section Title Here:', 'Luzuk' )
	)
);

addColorPalatOption($wp_customize, 'BusinessBlog_SectionTitleColor', 'bussinessblog_section', 'Section Title color', '#2b2b2b');
addColorPalatOption($wp_customize, 'BusinessBlog_SectionTitleBorderColor', 'bussinessblog_section', 'Section Title Border color', '#7d52fc');


lzCustomLable($wp_customize, 'bussiness_blopostimagesresset', 'bussinessblog_section', 'Note: Set posts images of same resolution');
 
 
$wp_customize->add_setting(
	'luzuk_bussinessblog_post_count',
	array(
		'default'           => '12',
		'sanitize_callback' => 'lz_fitness_sanitize_choices'
	)
);
$wp_customize->add_control(
	new lz_fitness_Dropdown_Chooser(
		$wp_customize,
		'luzuk_bussinessblog_post_count',
		array(
			'settings'      => 'luzuk_bussinessblog_post_count',
			'section'       => 'bussinessblog_section',
			'label'         => __( 'Number of  Business Posts to Show', 'Luzuk' ),
			'choices'       => $lz_fitness_post_count_choice
		)
	)
);
$wp_customize->add_setting(
	'luzuk_bussinessblog_cat_exclude',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Checkbox_Multiple(
		$wp_customize,
		'luzuk_bussinessblog_cat_exclude',
		array(
			'label' => __('Exclude Category from Blog Posts', 'Luzuk'),
			'section' => 'bussinessblog_section',
			'settings' => 'luzuk_bussinessblog_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', 'bussinessblog_section', 'Set Posts Image Hover Overlay Opacity & Its Background Color:');

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

lzCustomLable($wp_customize, 'sec_Businessblogsection_OtherC', 'bussinessblog_section', 'Other Colors:');


addColorPalatOption($wp_customize, 'BusinessBlog_TitleColor', 'bussinessblog_section', 'Posts Title color', '#222222');
addColorPalatOption($wp_customize, 'BusinessBlog_TitleHvrColor', 'bussinessblog_section', 'Posts Title Hover color', '#7d51fc');
addColorPalatOption($wp_customize, 'BusinessBlog_CatTextColor', 'bussinessblog_section', 'Posts Category Text color', '#ffffff');
addColorPalatOption($wp_customize, 'BusinessBlog_Cat1BgColor', 'bussinessblog_section', 'Category Text Background color 1', '#dc3d66');
addColorPalatOption($wp_customize, 'BusinessBlog_Cat2BgColor', 'bussinessblog_section', 'Category Text Background color 2', '#7d51fc');
addColorPalatOption($wp_customize, 'BusinessBlog_Cat3BgColor', 'bussinessblog_section', 'Category Text Background color 3', '#f8b739');
addColorPalatOption($wp_customize, 'BusinessBlog_Cat4BgColor', 'bussinessblog_section', 'Category Text Background color 4', '#296170');

addColorPalatOption($wp_customize, 'BusinessBlog_DateIconTxtColor', 'bussinessblog_section', 'Date Icon & Text color', '#9b9b9b');
addColorPalatOption($wp_customize, 'BusinessBlog_ContentColor', 'bussinessblog_section', 'Content color', '#646464');

addColorPalatOption($wp_customize, 'BusinessBlog_PrevNxtBtnColor', 'bussinessblog_section', 'Prev & Next Button color', '#ababab');
addColorPalatOption($wp_customize, 'BusinessBlog_PrevNxtBtnHvrsColor', 'bussinessblog_section', 'Prev & Next Button Hover color', '#ffffff');

addColorPalatOption($wp_customize, 'BusinessBlog_PrevNxtBtnBgssColor', 'bussinessblog_section', 'Prev & Next Button Background color', '#ffffff');
addColorPalatOption($wp_customize, 'BusinessBlog_PrevNxtBtnBgssHvrsColor', 'bussinessblog_section', 'Prev & Next Button Hover Background color', '#7d51fc');
