<?php
/* Prohibit direct script loading */
defined('ABSPATH') || die('No direct script access allowed!');
?>
<ul class="tabs wpmstabs">
    <?php
    $arrays = array(
        'wpms_display_order_menus' => array('menu_source_menus', esc_html__('Source: menu', 'wpmsPro')),
        'wpms_display_order_posts' => array('menu_source_posts', esc_html__('Source: posts', 'wpmsPro')),
        'wpms_display_order_pages' => array('menu_source_pages', esc_html__('Source: pages', 'wpmsPro')),
    );

    if (!empty($this->settings_sitemap['wpms_sitemap_customUrl'])) {
        $arrays['wpms_display_order_urls'] = array('menu_custom_url', esc_html__('Custom URL', 'wpmsPro'));
    }

    for ($i = 1; $i <= 4; $i ++) {
        foreach ($arrays as $key => $item) {
            if ((int) $this->settings_sitemap[$key] === (int) $i) {
                echo '<li class="tab wpmstab col"><a href="' . esc_attr('#' . $item[0]) . '">' . esc_html($item[1]) . '</a></li>';
            }
        }
    }
    ?>
</ul>