<?php
Kirki::add_section( 'social_links_settings_section', array(
    'title'          => esc_html__( 'Social Links Settings', 'author-portfolio' ),
    'panel'          => 'author_portfolio_global_panel',
    'capability'     => 'edit_theme_options',
) );

$social_media_fields = array(
    'facebook' => 'Facebook',
    'twitter' => 'Twitter',
    'instagram' => 'Instagram',
    'tiktok' => 'Tiktok',
    'linkedin' => 'Linkedin',
    'pinterest' => 'Pinterest',
    'line' => 'Line',
    'github' => 'Github',
    'discord' => 'Discord',
    'youtube' => 'Youtube',
    'wordpress' => 'WordPress',
    'slack' => 'Slack',
    'apple' => 'Apple',
    'stack-overflow' => 'Stack-overflow',
    'kickstarer' => 'Kickstarer',
    'dribble' => 'Dribble',
    'codepen' => 'Codepen',
    'whatsapp' => 'Whatsapp',
    'medium' => 'Medium',
    'goodreads-g' => 'Goodreads'
);

foreach ( $social_media_fields as $field => $label ) {
    Kirki::add_field( 'author_portfolio_pro_config', array(
        'type' => 'text',
        'settings' => $field,
        'label' => __( $label . ' URL', 'author-portfolio' ),
        'section' => 'social_links_settings_section',
        'default' => '#',
    ) );
}
