<?php
defined('ABSPATH') || exit('No Access!');

global $options, $labels;

$social_network = $options->get_option('social-network');
$social_network = is_array($social_network) ? $social_network : [];
if (is_array($social_network) && count($social_network)) {
    echo '<div class="footer-socials">';
    echo '<p>' . esc_html($labels->get_label('follow-on-social')) . '</p>';
    echo '<ul>';
    foreach ($social_network as $social) {
        $icon = $social['icon'] ?? null;
        $url = $social['url'] ?? null;
        $title = $social['title'] ?? null;
        $xfn = $social['xfn'] ?? null;
        echo '<li>';
        echo irk_linked_image($url, $icon, true, $xfn, null, irk_translated_string($title));
        echo '</li>';
    }
    echo '</ul>';
    echo '</div>';
}