<?php defined('ABSPATH') or die('No script kiddies please!'); ?>
<div class="wrap wpwab-wrap">
    <div class="wpwab-tab-contents">
        <h3><?php _e('Menu Option', wpwab_TD); ?></h3>
    </div>
    <div class="wpwab-field-wrap">
        <label><?php _e('Select Menu Option', wpwab_TD); ?></label>
        <div class="wpwab-field">
            <div class="wpwab-settings-field">
                <?php
                $wpwab_registered_menus = get_registered_nav_menus();

                foreach ($wpwab_registered_menus as $slug => $menu_name) {
                    $menu_slug_list[] = $slug;
                }
                // $this->print_array($wpwab_settings['menu_list']);
                foreach ($wpwab_registered_menus as $wpwab_registered_menu_slug => $wpwab_registered_menu_name) {
                    ?>
                    <label for="wpwab-<?php esc_attr_e($wpwab_registered_menu_slug); ?>"> <input
                            type="checkbox"
                            id="wpwab-<?php esc_attr_e($wpwab_registered_menu_slug); ?>"
                            name="wpwab_settings[menu_list][<?php esc_attr_e($wpwab_registered_menu_slug); ?>]"
                            value="<?php echo(!empty($wpwab_registered_menu_slug)) ? esc_attr($wpwab_registered_menu_slug) : ''; ?>"
                            <?php if (is_array($wpwab_settings['menu_list']) && in_array($wpwab_registered_menu_slug, $wpwab_settings['menu_list'])) echo 'checked'; ?>>
                            <?php _e($wpwab_registered_menu_name); ?>
                    </label>
                    <?php
                }
                ?>
            </div>
        </div>
    </div>
</div>
