<?php
    function health_customize_blog_tab($wp_customize, $theme_name){

        $wp_customize->add_section( 'health_blog_settings' , array(
            'title'      => esc_html__( 'Blog', 'health' ),
            'priority'   => 65,
        ) );


        $wp_customize->add_setting( 'health_blog_settings_type' , array(
			'default'     => 'classic',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );

        $wp_customize->add_control(
            'health_blog_settings_type',
            array(
                'label'    => esc_html__( 'Blog display type', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_type',
                'type'     => 'select',
                'choices'  => array(
                    'classic'  => esc_html__( 'Classic', 'health' ),
                    'grid' => esc_html__( 'Grid', 'health' ),
                ),
                'priority'   => 10
            )
        );


        $wp_customize->add_setting( 'health_blog_settings_date' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );
        
		$wp_customize->add_setting( 'health_blog_settings_author_name' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );

		$wp_customize->add_setting( 'health_blog_settings_author' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );

		$wp_customize->add_setting( 'health_blog_settings_comments' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );

        $wp_customize->add_setting( 'health_blog_settings_categories' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );

		$wp_customize->add_setting( 'health_blog_settings_tags' , array(
			'default'     => '1',
			'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_attr',
		) );
		
        $wp_customize->add_setting( 'health_blog_settings_share' , array(
            'default'     => '1',
            'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
            'sanitize_callback' => 'esc_attr',
        ) );
        
        $wp_customize->add_setting( 'health_blog_settings_readmore' , array(
            'default'     => esc_html__( 'Read more', 'health' ),
            'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
		    'sanitize_callback' => 'esc_html',
        ) );


        $wp_customize->add_control(
            'health_blog_settings_date',
            array(
                'label'    => esc_html__( 'Display Date on blog posts', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_date',
                'type'     => 'select',
                'choices'  => array(
                    '0'  => esc_html__( 'Off', 'health' ),
                    '1' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 50
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_author_name',
            array(
                'label'    => esc_html__( 'Display Author name on blog page and single post', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_author_name',
                'type'     => 'select',
                'choices'  => array(
                    '0'  => esc_html__( 'Off', 'health' ),
                    '1' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 60
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_author',
            array(
                'label'    => esc_html__( 'Display About Author block on single post', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_author',
                'type'     => 'select',
                'choices'  => array(
                    '0'  => esc_html__( 'Off', 'health' ),
                    '1' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 70
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_comments',
            array(
                'label'    => esc_html__( 'Display Comments on single post', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_comments',
                'type'     => 'select',
                'choices'  => array(
                    '0'  => esc_html__( 'Off', 'health' ),
                    '1' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 80
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_categories',
            array(
                'label'    => esc_html__( 'Display Categories', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_categories',
                'type'     => 'select',
                'choices'  => array(
                    '0'  => esc_html__( 'Off', 'health' ),
                    '1' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 90
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_tags',
            array(
                'label'    => esc_html__( 'Display Tags', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_tags',
                'type'     => 'select',
                'choices'  => array(
                    'off'  => esc_html__( 'Off', 'health' ),
                    'on' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 100
            )
        );
        
        $wp_customize->add_control(
            'health_blog_settings_share',
            array(
                'label'    => esc_html__( 'Display share buttons on single post', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_share',
                'type'     => 'select',
                'choices'  => array(
                    'off'  => esc_html__( 'Off', 'health' ),
                    'on' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 110
            )
        );
        
		$wp_customize->add_setting( 'health_blog_settings_sidebar' , array(
            'default'     => 'on',
            'transport'   => 'refresh',
            'theme_supports' => 'health_customize_opt',
            'sanitize_callback' => 'esc_attr',
        ) );		
		$wp_customize->add_control(
            'health_blog_settings_sidebar',
            array(
                'label'    => esc_html__( 'Sticky Sidebar', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_sidebar',
                'type'     => 'select',
                'choices'  => array(
                    'off'  => esc_html__( 'Off', 'health' ),
                    'on' => esc_html__( 'On', 'health' ),
                ),
                'priority'   => 120
            )
        );

        $wp_customize->add_control(
            'health_blog_settings_readmore',
            array(
                'label'    => esc_html__( 'Read More button text', 'health' ),
                'section'  => 'health_blog_settings',
                'settings' => 'health_blog_settings_readmore',
                'type'     => 'textfield',
                'priority'   => 10
            )
        );


    }
?>