# easy-elements/1.3.2/includes/Admin/settingstab/tab-userData.php

Easy Elements for Elementor – Addons &amp; Website Templates, version 1.3.2. 103 lines.

- Page: https://pluginprobe.com/plugins/easy-elements/1.3.2/code/includes/Admin/settingstab/tab-userData.php
- Raw: https://pluginprobe.com/plugins/easy-elements/1.3.2/raw/includes/Admin/settingstab/tab-userData.php
- Modified: 2026-01-29T12:34:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/easy-elements/1.3.2/code/includes/Admin/settingstab/tab-userData.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

$tab_slug = isset($current_tab) ? $current_tab : 'user_data';


// assume this file is in the plugin root and fields/ is sibling
include EASYELEMENTS_DIR_PATH . "includes/Admin/settings-framework/init.php";
$fields_dir = __DIR__ . '../settings-framework/fields';

$fm = new Easyel_FieldManager($fields_dir);


$settings = get_option('easy_element_user_data', []);
$settings_sections = [
    [
        'id' => 'social_feeds',
        'label' => 'Social Feeds',
    ],
];
$settings_fields = [
    [   
        'section_id' => 'social_feeds',
        'id' => 'fb_config',
        'name' => 'fb_config',
        'label' => 'Facebook',
        'type' => 'fields_group',
        'options' => [
            [ 'id' => 'page_id', 'name' => 'page_id', 'type' => 'text', 'default' => '', 'placeholder' => 'Page ID' ],
            [ 'id' => 'page_access_token', 'name' => 'page_access_token', 'type' => 'text', 'default' => '', 'class' => 'w-100', 'placeholder' => 'Page Access Token' ],
        ],
        'value' => !empty($settings['fb_config']) ? $settings['fb_config'] : [],
        'default' => '',
    ],
    [   
        'section_id' => 'social_feeds',
        'id' => 'insta_config',
        'name' => 'insta_config',
        'label' => 'Instagram',
        'type' => 'fields_group',
        'options' => [
            [ 'id' => 'username', 'name' => 'username', 'type' => 'text', 'default' => '', 'placeholder' => 'easy_elements' ],
            [ 'id' => 'page_access_token', 'name' => 'page_access_token', 'type' => 'text', 'default' => '', 'class' => 'w-100', 'placeholder' => 'Access Token' ],
        ],
        'value' => !empty($settings['insta_config']) ? $settings['insta_config'] : [],
        'default' => '',
    ],
];
?>
<div class="easyel-settings-wrapper">
    <div class="easyel-settings-topbar">
        <h3 class="easyel-settings-title"><?php echo esc_html__( 'Settings', 'easy-elements' )?></h3>
        <div class="easyel-settings-actions">
            <button type="button" id="easyel-settings-save">Save</button>
        </div>
    </div>
   <form id="easyel-settings-form" class="easyel-settings-wrapper">
        <div class="easyel-settings-fields">
            <?php foreach ( $settings_sections as $section ) : ?>
                <div class="easyel-settings-section" id="section-<?php echo esc_attr($section['id']); ?>">
                    <h3 class="easyel-section-title"><?php echo esc_html( $section['label'] ); ?></h3>

                    <?php foreach ( $settings_fields as $field ) : 
                        if($field['section_id'] !== $section['id']) continue;
                    ?>
                        
                        <?php
                        // Fields Group
                        if ($field['type'] === 'fields_group') {
                        ?>
                            <div class="easyel-settings-field">
                                <div class="easyel-settings-field-label"><?php echo esc_html($field['label']); ?></div>
                                <div class="easyel-settings-field-inputs">
                                    <div class="easyel-settings-field-input-wrapper">
                                        <?php $fm->render_fields_group($field, $settings); ?>
                                    </div>
                                </div>
                            </div>
                        <?php 
                        } else {
                            
                            //  Single Field Support
                            $name = $field['name'];
                            $value = $settings[$name] ?? ($field['default'] ?? '');
                            $field['full_name'] = $name;
                        ?>
                            <div class="easyel-settings-field">
                                <div class="easyel-settings-field-label"><?php echo esc_html($field['label']); ?></div>
                                <div class="easyel-settings-field-inputs">
                                    <div class="easyel-settings-field-input-wrapper">
                                        <?php $fm->render_field($field, $value, ['name'=>$name, 'settings'=>$settings]); ?>
                                    </div>
                                </div>
                            </div>
                        <?php } ?>

                    <?php endforeach; ?>

                </div>
            <?php endforeach; ?>
        </div>
    </form>
</div>
```
