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



lzCustomLable($wp_customize, 'sec_articlesblogsection_padding', 'articlesblog_section', 'Set Padding For articles posts Section:');

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

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


$wp_customize->add_setting(
	'articles_title_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text'
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'articles_title_heading',
		array(
			'settings'      => 'articles_title_heading',
			'section'       => 'articlesblog_section',
			'label'         => __( 'Section Title & Its Colors', 'Luzuk' ),
		)
	)
);
$wp_customize->add_setting(
	'articles_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Articles & Posts', 'Luzuk' )
	)
);
$wp_customize->add_control(
	'articles_title',
	array(
		'settings'      => 'articles_title',
		'section'       => 'articlesblog_section',
		'type'          => 'text',
		'label'         => __( 'Add Section Title Here:', 'Luzuk' )
	)
);

addColorPalatOption($wp_customize, 'articlesBlog_SectionTitleColor', 'articlesblog_section', 'Section Title color', '#2b2b2b');
addColorPalatOption($wp_customize, 'articlesBlog_SectionTitleBorderColor', 'articlesblog_section', 'Section Title Border color', '#7d52fc');


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

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

lzCustomLable($wp_customize, 'sec_articlesblogsection_OtherC', 'articlesblog_section', 'Other Colors:');


addColorPalatOption($wp_customize, 'articlesBlog_TitleHvrColor', 'articlesblog_section', 'Posts Title Hover color', '#7d51fc');
addColorPalatOption($wp_customize, 'articlesBlog_CatTextColor', 'articlesblog_section', 'Posts Category Text color', '#ffffff');
addColorPalatOption($wp_customize, 'articlesBlog_Cat1BgColor', 'articlesblog_section', 'Category Text Background color 1', '#dc3d66');
addColorPalatOption($wp_customize, 'articlesBlog_Cat2BgColor', 'articlesblog_section', 'Category Text Background color 2', '#7d51fc');
addColorPalatOption($wp_customize, 'articlesBlog_Cat3BgColor', 'articlesblog_section', 'Category Text Background color 3', '#f8b739');
addColorPalatOption($wp_customize, 'articlesBlog_Cat4BgColor', 'articlesblog_section', 'Category Text Background color 4', '#296170');

addColorPalatOption($wp_customize, 'articlesBlog_DateIconTxtColor', 'articlesblog_section', 'Date Icon & Text color', '#9b9b9b');
addColorPalatOption($wp_customize, 'articlesBlog_TitleColor', 'articlesblog_section', 'Posts Title color', '#222222');

// addColorPalatOption($wp_customize, 'articlesBlog_ContentColor', 'articlesblog_section', 'Content color', '#646464');

// addColorPalatOption($wp_customize, 'articlesBlog_PrevNxtBtnColor', 'articlesblog_section', 'Prev & Next Button color', '#ababab');
// addColorPalatOption($wp_customize, 'articlesBlog_PrevNxtBtnHvrsColor', 'articlesblog_section', 'Prev & Next Button Hover color', '#ffffff');

// addColorPalatOption($wp_customize, 'articlesBlog_PrevNxtBtnBgssColor', 'articlesblog_section', 'Prev & Next Button Background color', '#ffffff');
// addColorPalatOption($wp_customize, 'articlesBlog_PrevNxtBtnBgssHvrsColor', 'articlesblog_section', 'Prev & Next Button Hover Background color', '#7d51fc');
