<?php 
$wp_customize->add_section( 'roland_doctor_section', array(
	'capability'            => 'edit_theme_options',
	'priority'              => 5,
	'title'                 => __( 'Our Doctor', 'roland' ),
	'description'           => __( 'Doctor Section', 'roland' ),
	'panel'                 => 'roland_front_option'
) );

// Doctor Section Enable / Disable
$wp_customize->add_setting( 'roland_doctor_enable',
  array(
    'default'           => '',
    'sanitize_callback'     => 'roland_sanitize_checkbox'
  )
);

$wp_customize->add_control( 'roland_doctor_enable',
  array(
    'label'         => esc_html__( 'Show Doctor Slider', 'roland' ),
    'section'       => 'roland_doctor_section',
    'type'          => 'checkbox',
    'priority'      => 1,
  )
);

// Doctor Section Title
$wp_customize->add_setting( 'roland_d_bg_title', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'sanitize_text_field'
) );

$wp_customize->add_control( 'roland_d_bg_title', array(
    'label'                 =>  __( 'Section Top BG Title', 'roland' ),
    'section'               => 'roland_doctor_section',
    'type'                  => 'text',
    'settings'              => 'roland_d_bg_title',
) );

$wp_customize->add_setting( 'roland_d_title', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'sanitize_text_field'
) );

$wp_customize->add_control( 'roland_d_title', array(
    'label'                 =>  __( 'Section title', 'roland' ),
    'section'               => 'roland_doctor_section',
    'type'                  => 'text',
    'settings'              => 'roland_d_title',
) );

$wp_customize->add_setting( 'roland_d_content', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'sanitize_text_field'
) );

$wp_customize->add_control( 'roland_d_content', array(
    'label'                 =>  __( 'Section content', 'roland' ),
    'section'               => 'roland_doctor_section',
    'type'                  => 'text',
    'settings'              => 'roland_d_content',
) );

$wp_customize->add_setting( 'roland_d_icon', array(
    'capability'            => 'edit_theme_options',
    'default'               => '',
    'sanitize_callback'     => 'wp_filter_nohtml_kses'
) );

$wp_customize->add_control( 'roland_d_icon', array(
    'label'                 =>  __( 'Type section Icon', 'roland' ),
    'section'               => 'roland_doctor_section',
    'type'                  => 'text',
	'description'           => sprintf( esc_html( 'Type Icofont Icon: Eg: [icofont-doctor-alt]', 'roland' )),
    'settings'              => 'roland_d_icon',
) );

for ($i=1;$i<=4;$i++) {
	$wp_customize->add_setting( 'roland_doctor_page_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'roland_sanitize_dropdown_pages'
	) );


	$wp_customize->add_control( 'roland_doctor_page_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Select page for doctor %s', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'dropdown-pages',
	    'settings'              => 'roland_doctor_page_'.$i,
	) );
	
	// Doctor position
	$wp_customize->add_setting( 'roland_doctor_position_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_doctor_position_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor position %s', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
	    'settings' => 'roland_doctor_position_'.$i,
	) );
	
	$wp_customize->add_control( 'roland_doctor_positions_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Icon', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
		'description'           => sprintf( __( 'Use font awesome icon: Eg: %1$s. %2$s See more here %3$s', 'roland' ), $i,'<a href="'.esc_url('http://fontawesome.io/icons/').'">','</a>'),
	    'settings' => 'roland_doctor_positions_'.$i,
	) );
	
	// Doctor Social Icon 1
	$wp_customize->add_setting( 'roland_ts_icon_1_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_icon_1_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Icon 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
	    'settings' => 'roland_ts_icon_1_'.$i,
	) );
	// Doctor Social Icon Link 1
	$wp_customize->add_setting( 'roland_ts_link_1_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
		'sanitize_callback' => 'esc_url',
	) );

	$wp_customize->add_control( 'roland_ts_link_1_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Link 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'url',
	    'settings' => 'roland_ts_link_1_'.$i,
	) );
	
	// Doctor Social Icon 2
	$wp_customize->add_setting( 'roland_ts_icon_2_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_icon_2_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Icon 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
	    'settings' => 'roland_ts_icon_2_'.$i,
	) );
	// Doctor Social Icon Link 2
	$wp_customize->add_setting( 'roland_ts_link_2_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_link_2_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Link 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'url',
	    'settings' => 'roland_ts_link_2_'.$i,
	) );
	
	// Doctor Social Icon 3
	$wp_customize->add_setting( 'roland_ts_icon_3_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_icon_3_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Icon 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
	    'settings' => 'roland_ts_icon_3_'.$i,
	) );
	// Doctor Social Icon Link 3
	$wp_customize->add_setting( 'roland_ts_link_3_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_link_3_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Link 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'url',
	    'settings' => 'roland_ts_link_3_'.$i,
	) );
	
	// Doctor Social Icon 4
	$wp_customize->add_setting( 'roland_ts_icon_4_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_icon_4_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Icon 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'text',
	    'settings' => 'roland_ts_icon_4_'.$i,
	) );
	// Doctor Social Icon Link 4
	$wp_customize->add_setting( 'roland_ts_link_4_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'roland_ts_link_4_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Doctor Social Link 1', 'roland' ), $i ),
	    'section'               => 'roland_doctor_section',
	    'type'                  => 'url',
	    'settings' => 'roland_ts_link_4_'.$i,
	) );
	
	
}