<?php
// Featured Post Section.
$wp_customize->add_section('featured_author_section',
	array(
		'title'      => esc_html__('Link in Bio Section', 'united-blog'),
		'capability' => 'edit_theme_options',
		'panel'      => 'front_page_panel',
        'priority'   => 10,

	)
);

$wp_customize->add_setting('enable_author_section',
    array(
        'default'           => $default['enable_author_section'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_author_section',
    array(
		'label'    => __( 'Enable Link in Bio', 'united-blog' ),
        'section'  => 'featured_author_section',
        'type'     => 'checkbox',
    )
);

// Setting author_section_title.
$wp_customize->add_setting('author_section_title',
	array(
		'default'           => $default['author_section_title'],
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control('author_section_title',
	array(
		'label'    => esc_html__('Section Title', 'united-blog'),
		'section'  => 'featured_author_section',
		'type'     => 'text',
	)
);

$wp_customize->add_setting('author_section_description',
	array(
		'default'           => $default['author_section_description'],
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control('author_section_description',
	array(
		'label'    => esc_html__('Section Description', 'united-blog'),
		'section'  => 'featured_author_section',
		'type'     => 'textarea',
	)
);

$wp_customize->add_setting('author_section_image',
    array(
        'default' => $default['author_section_image'],
        'sanitize_callback' => 'united_blog_sanitize_image',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'author_section_image',
        array(
            'label' => __('Upload Image', 'united-blog'),
            'section' => 'featured_author_section',
        )
    )
);


$wp_customize->add_setting('author_facebook_url',
    array(
        'default'           => $default['author_facebook_url'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    'author_facebook_url',
    array(
        'label'    => __( 'Facebook URL', 'united-blog' ),
        'section'  => 'featured_author_section',
        'type'     => 'text',
    )
);

$wp_customize->add_setting(
    'author_twiter_url',
    array(
        'default'           => $default['author_twiter_url'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    'author_twiter_url',
    array(
        'label'    => __( 'Twitter URL', 'united-blog' ),
        'section'  => 'featured_author_section',
        'type'     => 'text',
    )
);

$wp_customize->add_setting(
    'author_instagram_url',
    array(
        'default'           => $default['author_instagram_url'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    'author_instagram_url',
    array(
        'label'    => __( 'Instagram URL', 'united-blog' ),
        'section'  => 'featured_author_section',
        'type'     => 'text',
    )
);

$wp_customize->add_setting(
    'author_linkedin_url',
    array(
        'default'           => $default['author_linkedin_url'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    'author_linkedin_url',
    array(
        'label'    => __( 'LinkedIn URL', 'united-blog' ),
        'section'  => 'featured_author_section',
        'type'     => 'text',
    )
);