<?php 
$wp_customize->add_section( 'buconz_starter_team_section', array(
	'capability'            => 'edit_theme_options',
	'priority'              => 5,
	'title'                 => __( 'Our Team', 'buconz-starter' ),
	'description'           => __( 'Team Section', 'buconz-starter' ),
	'panel'                 => 'buconz_starter_front_option'
) );

// Team Section Enable / Disable
$wp_customize->add_setting( 'buconz_starter_team_enable',
  array(
    'default'           => '',
    'sanitize_callback'     => 'buconz_starter_sanitize_checkbox'
  )
);

$wp_customize->add_control( 'buconz_starter_team_enable',
  array(
    'label'         => esc_html__( 'Show Team Slider', 'buconz-starter' ),
    'section'       => 'buconz_starter_team_section',
    'type'          => 'checkbox',
    'priority'      => 1,
  )
);


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

$wp_customize->add_control( 'buconz_starter_team_top_title', array(
    'label'                 =>  __( 'Service section top badge', 'buconz-starter' ),
    'section'               => 'buconz_starter_team_section',
    'type'                  => 'text',
    'settings'              => 'buconz_starter_team_top_title',
) );

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

$wp_customize->add_control( 'buconz_starter_team_title', array(
    'label'                 =>  __( 'Service section title', 'buconz-starter' ),
    'section'               => 'buconz_starter_team_section',
    'type'                  => 'text',
    'settings'              => 'buconz_starter_team_title',
) );

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

$wp_customize->add_control( 'buconz_starter_team_content', array(
    'label'                 =>  __( 'Service section description', 'buconz-starter' ),
    'section'               => 'buconz_starter_team_section',
    'type'                  => 'text',
    'settings'              => 'buconz_starter_team_content',
) );



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

$wp_customize->add_control( 'buconz_starter_team_icon', array(
    'label'                 =>  __( 'Use Team Social Icon', 'buconz-starter' ),
    'section'               => 'buconz_starter_team_section',
    'type'                  => 'text',
	/* translators: %s: Description */ 
    'description'           => sprintf( __( 'For team icon,  You can use font awesome icon: Eg: %1$s. %2$s See more here %3$s', 'buconz-starter' ), $buconz_starter_service,'<a href="'.esc_url('http://fontawesome.io/icons/').'">','</a>'),
    'settings'              => 'buconz_starter_team_icon',
) );

for ($i=1;$i<=3;$i++) {
	$wp_customize->add_setting( 'buconz_starter_team_page_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'buconz_starter_sanitize_dropdown_pages'
	) );


	$wp_customize->add_control( 'buconz_starter_team_page_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Select page for team %s', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'dropdown-pages',
	    'settings'              => 'buconz_starter_team_page_'.$i,
	) );
	
	// Team position
	$wp_customize->add_setting( 'buconz_starter_team_position_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

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

	$wp_customize->add_control( 'buconz_starter_ts_icon_1_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Icon 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'text',
	    'settings' => 'buconz_starter_ts_icon_1_'.$i,
	) );
	// Team Social Icon Link 1
	$wp_customize->add_setting( 'buconz_starter_ts_link_1_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
		'sanitize_callback' => 'esc_url',
	) );

	$wp_customize->add_control( 'buconz_starter_ts_link_1_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Link 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'url',
	    'settings' => 'buconz_starter_ts_link_1_'.$i,
	) );
	
	// Team Social Icon 2
	$wp_customize->add_setting( 'buconz_starter_ts_icon_2_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_icon_2_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Icon 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'text',
	    'settings' => 'buconz_starter_ts_icon_2_'.$i,
	) );
	// Team Social Icon Link 2
	$wp_customize->add_setting( 'buconz_starter_ts_link_2_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_link_2_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Link 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'url',
	    'settings' => 'buconz_starter_ts_link_2_'.$i,
	) );
	
	// Team Social Icon 3
	$wp_customize->add_setting( 'buconz_starter_ts_icon_3_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_icon_3_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Icon 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'text',
	    'settings' => 'buconz_starter_ts_icon_3_'.$i,
	) );
	// Team Social Icon Link 3
	$wp_customize->add_setting( 'buconz_starter_ts_link_3_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_link_3_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Link 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'url',
	    'settings' => 'buconz_starter_ts_link_3_'.$i,
	) );
	
	// Team Social Icon 4
	$wp_customize->add_setting( 'buconz_starter_ts_icon_4_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_icon_4_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Icon 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'text',
	    'settings' => 'buconz_starter_ts_icon_4_'.$i,
	) );
	// Team Social Icon Link 4
	$wp_customize->add_setting( 'buconz_starter_ts_link_4_'.$i, array(
	    'capability'            => 'edit_theme_options',
	    'default'               => '',
	    'sanitize_callback'     => 'sanitize_text_field'
	) );

	$wp_customize->add_control( 'buconz_starter_ts_link_4_'.$i, array(
		/* translators: %s: Description */ 
	    'label'                 =>  sprintf( __( 'Team Social Link 1', 'buconz-starter' ), $i ),
	    'section'               => 'buconz_starter_team_section',
	    'type'                  => 'url',
	    'settings' => 'buconz_starter_ts_link_4_'.$i,
	) );
	
	
}