<?php 
$wp_customize->add_section( 'roland_blog_section', array(
	'capability'            => 'edit_theme_options',
	'priority'              => 6,
	'title'                 => __( 'Latest Blog', 'roland' ),
	'description'           => __( 'Recent Published Blog.', 'roland' ),
	'panel'                 => 'roland_front_option'
) );

// Enable Slider Section
$wp_customize->add_setting( 'roland_blog_enable',
  array(
    'default'           => '',
    'sanitize_callback'     => 'roland_sanitize_checkbox'
  )
);

$wp_customize->add_control( 'roland_blog_enable',
  array(
    'label'         => esc_html__( 'Show Latest Blog', 'roland' ),
    'section'       => 'roland_blog_section',
    'type'          => 'checkbox',
    'priority'      => 1,
  )
);

// Add Image
$wp_customize->add_setting('roland_blog_left_img', array(
    'transport'         => 'refresh',
    'width'         => 1200,
    'height'         => 385,
	'sanitize_callback'     => 'roland_sanitize_image'
));

$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'roland_blog_left_img', array(
    'label'             => __('Upload Blog Left image', 'roland'),
    'section'           => 'roland_blog_section',
    'settings'          => 'roland_blog_left_img',
)));    

// Blog Title
$wp_customize->add_setting( 'roland_blog_title', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'sanitize_text_field'
) );

$wp_customize->add_control( 'roland_blog_title', array(
    'label'                 =>  __( 'Type Blog Title', 'roland' ),
    'section'               => 'roland_blog_section',
    'type'                  => 'text',
    'settings'              => 'roland_blog_title',
) );

// Blog Content
$wp_customize->add_setting( 'roland_blog_content', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'sanitize_text_field'
) );

$wp_customize->add_control( 'roland_blog_content', array(
    'label'                 =>  __( 'Type Blog contents', 'roland' ),
    'section'               => 'roland_blog_section',
    'type'                  => 'text',
    'settings'              => 'roland_blog_content',
) );

// Blog Button
$wp_customize->add_setting( 'roland_blog_button_link', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'esc_url_raw'
) );

$wp_customize->add_control( 'roland_blog_button_link', array(
    'label'                 =>  __( 'Type Blog Button Link', 'roland' ),
    'section'               => 'roland_blog_section',
    'type'                  => 'url',
    'settings'              => 'roland_blog_button_link',
) );



//	Blog Categories
$wp_customize->add_setting('roland_blog_category_id',array(
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'roland_sanitize_category',
	'default' =>  '1',
   )
);
$wp_customize->add_control(new roland_Customize_Dropdown_Taxonomies_Control($wp_customize,'roland_blog_category_id',
    array(
        'label' => __('Select category for Blog','roland'),
        'section' => 'roland_blog_section',
        'settings' => 'roland_blog_category_id',
        'type'=> 'dropdown-taxonomies',
    )
));