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



lzCustomLable($wp_customize, 'sec_financeblogsection_padding', 'financeblog_section', 'Set Padding For finance Posts Section:');

$wp_customize->add_setting(
    'sec_financeblogsectionTpadding', 
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '5em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_financeblogsectionTpadding',
    array(
        'settings'      => 'sec_financeblogsectionTpadding',
        'section'       => 'financeblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_financeblogsectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '2em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_financeblogsectionBpadding',
    array(
        'settings'      => 'sec_financeblogsectionBpadding',
        'section'       => 'financeblog_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'Luzuk' )
    )
);

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


$wp_customize->add_setting(
	'finance_title_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'finance_title_heading',
		array(
			'settings'      => 'finance_title_heading',
			'section'       => 'financeblog_section',
			'label'         => __( 'Section Title', 'Luzuk' ),
		)
	)
);
$wp_customize->add_setting(
	'finance_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Finance', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'finance_title',
	array(
		'settings'      => 'finance_title',
		'section'       => 'financeblog_section',
		'type'          => 'text',
		'label'         => __( 'Add Section Title Here:', 'Luzuk' )
	)
);

addColorPalatOption($wp_customize, 'financeBlog_SectionTitleColor', 'financeblog_section', 'Section Title color', '#2b2b2b');
addColorPalatOption($wp_customize, 'financeBlog_SectionTitleBorderColor', 'financeblog_section', 'Section Title Border color', '#7d52fc');


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

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

lzCustomLable($wp_customize, 'sec_financeblogsection_OtherC', 'financeblog_section', 'Other Colors:');


addColorPalatOption($wp_customize, 'financeBlog_TitleColor', 'financeblog_section', 'Posts Title color', '#222222');
addColorPalatOption($wp_customize, 'financeBlog_TitleHvrColor', 'financeblog_section', 'Posts Title Hover color', '#7d51fc');
addColorPalatOption($wp_customize, 'financeBlog_CatTextColor', 'financeblog_section', 'Posts Category Text color', '#ffffff');
addColorPalatOption($wp_customize, 'financeBlog_Cat1BgColor', 'financeblog_section', 'Category Text Background color 1', '#dc3d66');
addColorPalatOption($wp_customize, 'financeBlog_Cat2BgColor', 'financeblog_section', 'Category Text Background color 2', '#7d51fc');
addColorPalatOption($wp_customize, 'financeBlog_Cat3BgColor', 'financeblog_section', 'Category Text Background color 3', '#f8b739');
addColorPalatOption($wp_customize, 'financeBlog_Cat4BgColor', 'financeblog_section', 'Category Text Background color 4', '#296170');

addColorPalatOption($wp_customize, 'financeBlog_DateIconTxtColor', 'financeblog_section', 'Date Icon & Text color', '#9b9b9b');
addColorPalatOption($wp_customize, 'financeBlog_ContentColor', 'financeblog_section', 'Content color', '#646464');

addColorPalatOption($wp_customize, 'financeBlog_PrevNxtBtnColor', 'financeblog_section', 'Prev & Next Button color', '#ababab');
addColorPalatOption($wp_customize, 'financeBlog_PrevNxtBtnHvrsColor', 'financeblog_section', 'Prev & Next Button Hover color', '#ffffff');

addColorPalatOption($wp_customize, 'financeBlog_PrevNxtBtnBgssColor', 'financeblog_section', 'Prev & Next Button Background color', '#f7f7f7');
addColorPalatOption($wp_customize, 'financeBlog_PrevNxtBtnBgssHvrsColor', 'financeblog_section', 'Prev & Next Button Hover Background color', '#7d51fc');
