# easy-elements/1.2.1/admin/settings.php

Easy Elements for Elementor – Addons &amp; Website Templates, version 1.2.1. 1,333 lines.

- Page: https://pluginprobe.com/plugins/easy-elements/1.2.1/code/admin/settings.php
- Raw: https://pluginprobe.com/plugins/easy-elements/1.2.1/raw/admin/settings.php
- Modified: 2025-12-02T11:10:46+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.2.1/code/admin/settings.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Easyel_Elements {

    // Singleton instance
    private static $instance = null;

    private function __construct() {
        // Hooks
        
        // Custom Font Load Free

        add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu' ) );
        add_action( 'admin_init', array( $this, 'easyel_elements_register_settings' ) );

        add_action( 'easyel_smooth_scroller_popup', array( $this, 'easyel_smooth_scroller_popup_callback' ), 5 );

        $this->easyel_settings_ajax();
       
    }

    public function easyel_settings_ajax( ) {
        
        // AJAX handler for saving minify js option

        add_action('wp_ajax_easy_elements_save_widget_setting', array( $this, "easy_elements_save_widget_setting" ) );
        add_action('wp_ajax_easy_elements_bulk_action', array( $this, 'easy_elements_bulk_action') );
       
        add_action('wp_ajax_easy_elements_save_global_extensions', array( $this, 'easy_elements_save_global_extensions') ) ;
        add_action('wp_ajax_easy_elements_save_global_extensions_bulk', array( $this, 'easy_elements_save_global_extensions_bulk') ) ;

        add_action('wp_ajax_easy_elements_bulk_group_action', [$this, 'easy_elements_bulk_group_action']);

        add_action('admin_enqueue_scripts', array( $this, 'easyel_elements_enqueue_admin_assets') );
        add_action( 'admin_head', array( $this, 'easyel_hide_admin_notices' ) );

        add_action('wp_ajax_easyel_save_user_data', array( $this, 'easyel_save_user_data_callback') );

        add_action('wp_ajax_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings'));
        add_action('wp_ajax_nopriv_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings') );

    }

    // Singleton get_instance
    public static function get_instance() {
        if (self::$instance === null) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    public function easyel_save_user_data_callback() {

        check_ajax_referer('easy_elements_nonce', 'security');

        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
        $posted = $_POST['settings'] ?? [];
        $settings = map_deep( wp_unslash( $posted ), 'sanitize_text_field' );

        update_option( 'easy_element_user_data', $settings );

        wp_send_json_success(['message' => 'Saved successfully!']);
    }

    public function easyel_elements_settings_menu() {

        // Main Menu
        add_menu_page(
            __('Easy Elements', 'easy-elements'),
            __('Easy Elements', 'easy-elements'),
            'manage_options',
            'easy-elements-dashboard',
            array( $this, 'easyel_elements_settings_callback' ),
            'dashicons-admin-generic',
            59
        );

        global $submenu;

        // Main slug
        $slug = 'easy-elements-dashboard';

        $submenu[$slug][] = [ __('Overview', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#overview' ];
        $submenu[$slug][] = [ __('Widgets', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#widget' ];
        $submenu[$slug][] = [ __('All Extensions', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#extensions' ];

        // Header & Footer Submenu
        add_submenu_page(
            'easy-elements-dashboard',
            __('Header & Footer', 'easy-elements'),
            __('Header & Footer', 'easy-elements'),
            'manage_options',
            'edit.php?post_type=ee-elementor-hf'
        );

        // Upload Custom Fonts Submenu
        add_submenu_page(
            'easy-elements-dashboard',
            __('Upload Custom Fonts', 'easy-elements'),
            __('Upload Custom Fonts', 'easy-elements'),
            'manage_options',
            'easyel-custom-fonts',
            array( $this, 'easyel_custom_fonts_page_html' )
        );

        // Off Canvas Submenu
        add_submenu_page(
            'easy-elements-dashboard',                 
            __('Off Canvas', 'easy-elements'),         
            __('Off Canvas', 'easy-elements'),         
            'manage_options',                          
            'edit.php?post_type=easy-offcanvas'
        );
    }

    public function easyel_elements_register_settings() {
        register_setting( 'easyel_elements_extensions_group', 'easyel_enable_js_animation', [
            'sanitize_callback' => 'absint',
            'default' => 0,
        ] );

        // Cursor setting register
        register_setting( 'easyel_elements_extensions_group', 'easyel_enable_cursor', [
            'sanitize_callback' => 'absint',
            'default' => 0,
        ] );
    }

    public function easy_elements_bulk_group_action() {

        if (!current_user_can('manage_options')) {
            wp_send_json_error(__('Unauthorized', 'easy-elements'));
        }

        check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce');

        $group = isset($_POST['group']) ? sanitize_text_field(wp_unslash($_POST['group'])) : '';
        $tab   = isset($_POST['tab']) ? sanitize_text_field(wp_unslash($_POST['tab'])) : 'widget';
        $status = isset($_POST['status']) && $_POST['status'] == 1 ? '1' : '0';
      
        $available_elements = $this->easyel_elements_get_available_widgets();
        $updated_count = 0;

        $is_pro_active = class_exists('Easy_Elements_Pro');

        foreach ($available_elements as $key => $widget) {

            if (!isset($widget['tab']) || $widget['tab'] !== $tab) {
                continue;
            }

            $group_slug = strtolower(trim($group));

            $widget_group = isset( $widget['group'] ) ? $widget['group'] : 'General Widgets';

            $widget_group_slug = strtolower(trim(str_replace(' ', '-', $widget_group ) ) );

            if ($widget_group_slug !== $group_slug) {
                continue; 
            }

            $option_name = 'easy_element_' . $tab . '_' . $key;

            if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) {
                update_option($option_name, '0');
            } else {
                update_option($option_name, $status);
            }

            $updated_count++;
        }

        wp_send_json_success([
            'message'       => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'),
            'count'         => $updated_count,
            'is_pro_active' => $is_pro_active,
            'status'        => $status
        ]);
    }

    public function easy_elements_save_global_extensions_bulk() {
        if ( ! current_user_can( 'manage_options' ) ) {
            wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) );
        }

        check_ajax_referer( 'easy_elements_widget_settings_nonce', 'nonce' );

        $tab        = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions';
        $keys       = isset( $_POST['keys'] ) ? array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['keys'] ) ) : [];
        $status     = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0;
        $group_slug = isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : '';

        if ( empty( $keys ) ) {
            wp_send_json_error( [ 'message' => __( 'No keys provided', 'easy-elements' ) ] );
        }

        $settings = get_option( 'easy_element_' . $tab, [] );
        
        foreach ( $keys as $key ) {
            $key = sanitize_text_field( $key );
            $settings[ $key ] = $status;
        }

        update_option( 'easy_element_' . $tab, $settings );

        if ( $group_slug ) {
            update_option( 'easy_element_group_' . $group_slug, $status );
        }

        wp_send_json_success( [ 'message' => __( 'Bulk settings updated', 'easy-elements' ) ] );
    }

    public function easy_elements_save_global_extensions() {
        if (!current_user_can('manage_options')) {
            wp_send_json_error(__('Unauthorized', 'easy-elements'));
        }

        check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce');

        $tab        = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions';
        $key        = isset($_POST['key']) ? sanitize_text_field( wp_unslash( $_POST['key'] )) : '';
        $status     = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0;

        if (!$key) {
            wp_send_json_error(['message' => __('Invalid key', 'easy-elements')]);
        }

        $settings = get_option('easy_element_' . $tab, []);
        $settings[$key] = $status;

        update_option('easy_element_' . $tab, $settings);

        wp_send_json_success(['message' => __('Settings updated', 'easy-elements')]);
    }


    // AJAX handler for saving individual widget settings
  
    public function easy_elements_save_widget_setting() {
        if (!current_user_can('manage_options')) {
            wp_send_json_error(__('Unauthorized', 'easy-elements'));
        }
        check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce');
        
        $widget_key = isset($_POST['widget_key']) ? sanitize_text_field( wp_unslash($_POST['widget_key'] ) ) : '';
        $status = isset($_POST['status']) && $_POST['status'] === '1' ? '1' : '0';
        $tab_slug   = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget';
        
        if (!empty( $widget_key ) ) {
            $option_name = 'easy_element_' . $tab_slug . '_' . $widget_key;

            update_option($option_name, $status);

            wp_send_json_success([
                'message' => __('Widget setting updated successfully', 'easy-elements'),
                'status'  => $status,
            ]);
        } else {
            wp_send_json_error(['message' => __('Invalid widget key', 'easy-elements')]);
        }
    }

    // AJAX handler for bulk actions
    public function easy_elements_bulk_action() {
        if (!current_user_can('manage_options')) {
            wp_send_json_error(__('Unauthorized', 'easy-elements'));
        }
        check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce');
        
        $bulk_action = isset($_POST['bulk_action']) ? sanitize_text_field(wp_unslash($_POST['bulk_action'])) : '';
        $tab = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget';
        $status = $bulk_action === 'activate_all' ? '1' : '0';
        
        $available_elements = $this->easyel_elements_get_available_widgets();
        $updated_count = 0;

        $is_pro_active = class_exists('Easy_Elements_Pro');

        foreach ($available_elements as $key => $widget) {
            if (isset($widget['tab']) && $widget['tab'] === $tab) {
                $option_name = 'easy_element_' . $tab . '_' . $key;

                if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) {
                     update_option($option_name, '0'); 
                 } else {
                    $status = $bulk_action === 'activate_all' ? '1' : '0';
                    update_option($option_name, $status);
                }
            }
        }
        
        wp_send_json_success([
            'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'),
            'count' => $updated_count,
            'is_pro_active' => $is_pro_active
        ]);
    }


    function easyel_elements_settings_callback() {
        $available_elements = $this->easyel_elements_get_available_widgets();

        $easyel_tabs = [
            'overview'   => __('Overview', 'easy-elements'),
            'widget'     => __('All Widgets', 'easy-elements'),
            'extensions' => __('All Extensions', 'easy-elements'),
            'advsettings' => __('Advanced Settings', 'easy-elements'),
            'userData' => __('API Settings', 'easy-elements'),
        ];

        $easyel_tab_list = apply_filters("easyel_all_tab_list",  $easyel_tabs );

        ?>
        <div class="easyel-overview-header">
            <img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'admin/img/easy-logo.png' ); ?>" alt="<?php echo esc_attr( 'logo' ); ?>">

        </div>
        <div class=" easyel-plugin-settings-wrapper">
            <div class="easyel-nav-tab-item">
                <div class="easyel-nav-tab-wrapper easyel-border-radius-20">
                    <a href="#overview" class="easyel-nav-tab easyel-nav-tab-active" data-tab="overview"><i class="easyelIcon-home"></i> <?php esc_html_e ('Overview','easy-elements'); ?></a>
                    <a href="#widget" class="easyel-nav-tab" data-tab="widget"><i class="easyelIcon-widgets"></i><?php esc_html_e('All Widgets','easy-elements'); ?></a>
                    <a href="#extensions" class="easyel-nav-tab" data-tab="extensions"><i class="easyelIcon-extension"></i><?php esc_html_e('All Extensions','easy-elements'); ?></a>
                    <a href="#userData" class="easyel-nav-tab" data-tab="userData"><i class="easyelIcon-setting"></i><?php esc_html_e('API Settings','easy-elements'); ?></a>
                    <a href="<?php echo esc_url( admin_url( 'admin.php?page=easy-elements-license' ) ); ?>" 
                        class="easyel-nav-tab" 
                        data-tab="activate_license">
                        <i class="easyelIcon-license-pro"></i>
                        <?php esc_html_e('Activate License','easy-elements'); ?>
                    </a>
                    <div class="easyel-tab-pro-link">
                        <a href="https://wpeasyelements.com/pricing/" class="easyel-nav-tab-pro" target="_blank">
                            <i class="easyelIcon-crown"></i>
                            <?php esc_html_e('Go Premium','easy-elements'); ?>
                        </a>
                    </div>
                </div>
            </div>
            <!-- Status Messages -->
            <div id="bulk-action-message" class="notice" style="display: none;"></div>

            <!-- Tab Content -->
            <div id="easyel-tab-content">
                <?php foreach ( $easyel_tabs as $tab_slug => $tab_label ) : ?>
                    <div id="tab-<?php echo esc_attr($tab_slug); ?>" 
                        class="easyel-tab-panel easyel-border-radius-20 <?php echo esc_attr($tab_slug); ?>" 
                        style="<?php echo $tab_slug === 'overview' ? '' : 'display:none;'; ?>">

                        <?php 
                        if ( $tab_slug === 'widget' ) : ?>
                            <div class="easyel-addon-search easyel-dflex easyel-justify-between">
                                <div class="easyel-widget-filter">
                                    <h1 class="easyel-dashboard-heading"><?php esc_html_e('Widgets','easy-elements');?></h1>
                                    <div class="easyel-widget-filter-button">
                                        <button type="button" id="easyel_all" class="easyel-action-btn active" data-filter="easyel_all"><?php esc_html_e('All', 'easy-elements'); ?></button>
                                        <button type="button" id="easyel_free" class="easyel-action-btn" data-filter="easyel_free"><?php esc_html_e('Free', 'easy-elements'); ?></button>
                                        <button type="button" id="easyel_pro" class="easyel-action-btn" data-filter="easyel_pro"><?php esc_html_e('Pro', 'easy-elements'); ?></button>
                                    </div>
                                </div>
                                <div class="easyel-widget-search-enable">
                                    <div class="easyel-widget-activeDeactivate-button">
                                        <button type="button" id="activate-all-btn"><?php esc_html_e('Activate All', 'easy-elements'); ?></button>
                                        <button type="button" id="deactivate-all-btn"><?php esc_html_e('Deactivate All', 'easy-elements'); ?></button>
                                    </div>
                                    <?php if ( $tab_slug === 'widget' ) { ?>
                                        <input type="text" id="element-search" placeholder="<?php esc_attr_e('Search widgets...', 'easy-elements'); ?>">
                                    <?php } ?>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php 
                        $tab_file = EASYELEMENTS_DIR_PATH . '/admin/settingstab/tab-' . $tab_slug . '.php';

                        if ( file_exists( $tab_file ) ) {
                            include $tab_file; 
                        } 
                        ?>
                    </div>
                <?php endforeach; ?>
            </div>

        </div>

        <!-- JavaScript functionality is handled by admin.js -->
        <?php
    }

    ////////****************** AJAX Toggle ********************************

    public function Easyel_Elements_enqueue_admin_assets($hook) {
        if (strpos($hook, 'easy-elements') === false) {
            return;
        }
        
        // Enqueue admin JavaScript
        wp_enqueue_script(
            'easy-elements-admin',
            plugin_dir_url(__DIR__) . 'assets/js/admin.js',
            ['jquery'],
            '1.0.0',
            true
        );

        
        // Localize script with all necessary data
        wp_localize_script('easy-elements-admin', 'easyElementsData', [
            'ajaxurl' => admin_url('admin-ajax.php'),
            'nonce'   => wp_create_nonce('easy_elements_nonce'),
            'widget_settings_nonce' => wp_create_nonce('easy_elements_widget_settings_nonce'),
            'bulk_action_nonce' => wp_create_nonce('easy_elements_bulk_action_nonce'),
            'advance_settings_nonce' => wp_create_nonce('easy_elements_save_advance_settings_nonce'),
            'js_animation_nonce' => wp_create_nonce('easyel_js_animation_nonce'),
            'strings' => [
                'confirm_activate_all' => __('Are you sure you want to activate all widgets?', 'easy-elements'),
                'confirm_deactivate_all' => __('Are you sure you want to deactivate all widgets?', 'easy-elements'),
                'processing' => __('Processing...', 'easy-elements'),
                'saving' => __('Saving...', 'easy-elements'),
                'saved' => __('Saved!', 'easy-elements'),
                'error' => __('Error!', 'easy-elements'),
                'updated' => __('Updated!', 'easy-elements'),
            ]
        ]);
    }

    function easyel_elements_get_available_widgets() {
        $widgets = [           
            'heading' => [
                'icon'        => 'easyelIcon-heading',
                'title'       => 'Heading',
                'description' => 'Add customizable headings with style options.',
                'demo_url'    => 'https://wpeasyelements.com/heading/',
                'docx_url'    => 'https://wpeasyelements.com/docs/heading/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'clients_logo' => [
                'icon'        => 'easyelIcon-clients-logo-grid',
                'title'       => 'Clients Logo Grid',
                'description' => 'Showcase client logos in a neat grid layout.',
                'demo_url'    => 'https://wpeasyelements.com/clients-logo-grid/',
                'docx_url'    => 'https://wpeasyelements.com/docs/clients-logo-grid',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'clients_logo_slider' => [
                'icon'        => 'easyelIcon-clients-logo-slider',
                'title'       => 'Clients Logo Slider',
                'description' => 'Display client logos in a slider format.',
                'demo_url'    => 'https://wpeasyelements.com/clients-logo-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/clients-logo-slider/',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],
            'simple_tab' => [
                'icon'        => 'easyelIcon-tab',
                'title'       => 'Tab',
                'description' => 'Add simple tab content.',
                'demo_url'    => 'https://wpeasyelements.com/tab',
                'docx_url'    => 'https://wpeasyelements.com/docs/tab',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'tab_advance' => [
                'icon'        => 'easyelIcon-tab',
                'title'       => 'Advanced Tab',
                'description' => 'Create advanced tab content.',
                'demo_url'    => 'https://wpeasyelements.com/advanced-tab/',
                'docx_url'    => 'https://wpeasyelements.com/docs/advanced-tab/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'testimonials' => [
                'icon'        => 'easyelIcon-testimonials-grid',
                'title'       => 'Testimonials Grid',
                'description' => 'Show testimonials in a grid format.',
                'demo_url'    => 'https://wpeasyelements.com/testimonials-grid',
                'docx_url'    => 'https://wpeasyelements.com/docs/testimonials-grid',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'testimonials_slider' => [
                'icon'        => 'easyelIcon-testimonials-slider',
                'title'       => 'Testimonials Slider',
                'description' => 'Display testimonials in a slider format.',
                'demo_url'    => 'https://wpeasyelements.com/testimonials-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/testimonials-slider/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'image_carousel' => [
                'icon'        => 'easyelIcon-image-carousel',
                'title'       => 'Image Carousel',
                'description' => 'Create an image slider with multiple images.',
                'demo_url'    => 'https://wpeasyelements.com/image-carousel/',
                'docx_url'    => 'https://wpeasyelements.com/docs/image-carousel',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'image_reveal' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Reveal Image',
                'description' => 'reveal Image Here',
                'demo_url'    => 'https://wpeasyelements.com/reveal-image/',
                'docx_url'    => 'https://wpeasyelements.com/docs/reveal-image/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'rotate_text' => [
                'icon'        => 'easyelIcon-heading',
                'title'       => 'Rotate Text',
                'description' => 'rotate text here',
                'demo_url'    => 'https://wpeasyelements.com/rotate-text/',
                'docx_url'    => 'https://wpeasyelements.com/docs/rotate-text/',
                'is_pro'      => true,
                'tab'         => 'widget',
            ],
            'icon_box' => [
                'icon'        => 'easyelIcon-iconbox',
                'title'       => 'Info Box',
                'description' => 'Display content with an icon.',
                'demo_url'    => 'https://wpeasyelements.com/info-box',
                'docx_url'    => 'https://wpeasyelements.com/docs/info-box',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'process_grid' => [
                'icon'        => 'easyelIcon-process-grid',
                'title'       => 'Process Grid',
                'description' => 'Show process steps in a grid format.',
                'demo_url'    => 'https://wpeasyelements.com/process-grid',
                'docx_url'    => 'https://wpeasyelements.com/docs/process-grid',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'process_slider' => [
                'icon'        => 'easyelIcon-process-slider',
                'title'       => 'Process Slider',
                'description' => 'Show process steps in a slider.',
                'demo_url'    => 'https://wpeasyelements.com/process-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/process-slider/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'team_grid' => [
                'icon'        => 'easyelIcon-team-grid',
                'title'       => 'Team Grid',
                'description' => 'Display team members in a grid format.',
                'demo_url'    => 'https://wpeasyelements.com/team-grid',
                'docx_url'    => 'https://wpeasyelements.com/docs/team-grid',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'team_slider' => [
                'icon'        => 'easyelIcon-team-slider',
                'title'       => 'Team Slider',
                'description' => 'Showcase team members in a slider format.',
                'demo_url'    => 'https://wpeasyelements.com/team-slider',
                'docx_url'    => 'https://wpeasyelements.com/docs/team-slider',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'contact_box' => [
                'icon'        => 'easyelIcon-contact-box',
                'title'       => 'Contact Box',
                'description' => 'Contact Box.',
                'demo_url'    => 'https://wpeasyelements.com/contact-box',
                'docx_url'    => 'https://wpeasyelements.com/docs/contact-box',
                'is_pro'      => false,
                'tab' => 'widget',
            ],        
            'icon_box_slider' => [
                'icon'        => 'easyelIcon-icon-box-slider',
                'title'       => 'Info Box Slider',
                'description' => 'Info Box Slider.',
                'demo_url'    => 'https://wpeasyelements.com/info-box-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/info-box-slider/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],  
            'timeline_slider' => [
                'icon'        => 'easyelIcon-timeline-slider',    
                'title'       => 'Timeline Slider',
                'description' => 'Timeline Slider.',
                'demo_url'    => 'https://wpeasyelements.com/timeline-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/timeline-slider',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],      
            'faq' => [
                'icon'        => 'easyelIcon-faq-1',
                'title'       => 'FAQ',
                'description' => 'FAQ.',
                'demo_url'    => 'https://wpeasyelements.com/faq',
                'docx_url'    => 'https://wpeasyelements.com/docs/faq',
                'is_pro'      => false,
                'tab' => 'widget',
            ],       
            'blog_grid' => [
                'icon'        => 'easyelIcon-post-grid',
                'title'       => 'Post Grid',
                'description' => 'Post.',
                'demo_url'    => 'https://wpeasyelements.com/post-grid',
                'docx_url'    => 'https://wpeasyelements.com/docs/post-grid',
                'is_pro'      => false,
                'tab' => 'widget',
            ],        
            'post_slider' => [
                'icon'        => 'easyelIcon-post-slider',
                'title'       => 'Post Slider',
                'description' => 'Post Slider.',
                'demo_url'    => 'https://wpeasyelements.com/post-slider/',
                'docx_url'    => 'https://wpeasyelements.com/docs/post-slider/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],  
            'easy_cf7' => [
                'icon'        => 'easyelIcon-contact-form',
                'title'       => 'Contact Form 7',
                'description' => 'Contact form 7.',
                'demo_url'    => 'https://wpeasyelements.com/contact-form-7',
                'docx_url'    => 'https://wpeasyelements.com/docs/contact-form-7',
                'is_pro'      => false,
                'tab' => 'widget',
            ],      
            'video' => [
                'icon'        => 'easyelIcon-video',
                'title'       => 'Video',
                'description' => 'Video.',
                'demo_url'    => 'https://wpeasyelements.com/video',
                'docx_url'    => 'https://wpeasyelements.com/docs/video',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'pricing_table' => [
                'icon'        => 'easyelIcon-pricing-table',
                'title'       => 'Pricing Table',
                'description' => 'Pricing Table.',
                'demo_url'    => 'https://wpeasyelements.com/pricing-table',
                'docx_url'    => 'https://wpeasyelements.com/docs/pricing-table',
                'is_pro'      => false,
                'group'       => 'Marketing Widgets',
                'tab' => 'widget',
            ],                               
            'pricing_list' => [
                'icon'        => 'easyelIcon-pricing-list',
                'title'       => 'Pricing List',
                'description' => 'Pricing List.',
                'demo_url'    => 'https://wpeasyelements.com/pricing-list/',
                'docx_url'    => 'https://wpeasyelements.com/docs/pricing-list/',
                'is_pro'      => true,
                'group'       => 'Marketing Widgets',
                'tab' => 'widget',
            ],
            'pricing_tab' => [
                'icon'        => 'easyelIcon-pricing-table',
                'title'       => 'Pricing Tab',
                'description' => 'Pricing Tab.',
                'demo_url'    => 'https://wpeasyelements.com/pricing-tab/',
                'docx_url'    => 'https://wpeasyelements.com/docs/pricing-tab/',
                'is_pro'      => true,
                'group'       => 'Marketing Widgets',
                'tab' => 'widget',
            ],         
            'service_list' => [
                'icon'        => 'easyelIcon-service-list',
                'title'       => 'Service List',
                'description' => 'Service List.',
                'demo_url'    => 'https://wpeasyelements.com/service-list',
                'docx_url'    => 'https://wpeasyelements.com/docs/service-list/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'process_list' => [
                'icon'        => 'easyelIcon-process-list',
                'title'       => 'Process List',
                'description' => 'Process List.',
                'demo_url'    => 'https://wpeasyelements.com/process-list/',
                'docx_url'    => 'https://wpeasyelements.com/docs/process-list/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'marquee_logo' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Marquee',
                'description' => 'Marquee.',
                'demo_url'    => 'https://wpeasyelements.com/marquee/',
                'docx_url'    => 'https://wpeasyelements.com/docs/marquee/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'button' => [
                'icon'        => 'easyelIcon-button',
                'title'       => 'Button',
                'description' => 'Button.',
                'demo_url'    => 'https://wpeasyelements.com/button/',
                'docx_url'    => 'https://wpeasyelements.com/docs/button',
                'is_pro'      => false,
                'tab' => 'widget',
            ],       
            'social_share' => [
                'icon'        => 'easyelIcon-social-share',
                'title'       => 'Social Share',
                'description' => 'Social Share.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'social_icon' => [
                'icon'        => 'easyelIcon-social-icons',
                'title'       => 'Social Icon',
                'description' => 'Social Icon.',
                'demo_url'    => 'https://wpeasyelements.com/social-icon',
                'docx_url'    => 'https://wpeasyelements.com/docs/social-icon',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'breadcrumb' => [
                'icon'        => 'easyelIcon-breadcumb',
                'title'       => 'Breadcrumb',
                'description' => 'Breadcrumb.',
                'demo_url'    => 'https://wpeasyelements.com/breadcrumb',
                'docx_url'    => 'https://wpeasyelements.com/docs/breadcrumb',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'easy_slider' => [
                'icon'        => 'easyelIcon-slider',
                'title'       => 'Slider',
                'description' => 'Slider.',
                'demo_url'    => 'https://wpeasyelements.com/slider',
                'docx_url'    => 'https://wpeasyelements.com/docs/slider',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'image_accordion' => [
                'icon'        => 'easyelIcon-image-accordion',
                'title'       => 'Image Accordion',
                'description' => 'Image Accordion',
                'demo_url'    => 'https://wpeasyelements.com/image-accordion/',
                'docx_url'    => 'https://wpeasyelements.com/docs/image-accordion/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'domain_search' => [
                'icon'        => 'easyelIcon-domain-search',    
                'title'       => 'Domain Search',
                'description' => 'Domain Search.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'featured_project' => [
                'icon'        => 'easyelIcon-custom-projects',    
                'title'       => 'Custom Projects',
                'description' => 'Custom Projects.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'advance_button' => [
                'icon'        => 'easyelIcon-button',    
                'title'       => 'Advance Button',
                'description' => 'Advance Button.',
                'demo_url'    => 'https://wpeasyelements.com/advance-button/',
                'docx_url'    => 'https://wpeasyelements.com/docs/advance-button',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'hr_image_scroll' => [
                'icon'        => 'easyelIcon-image-horizontal-scroll',    
                'title'       => 'Horizontal Scroll',
                'description' => 'Horizontal Scroll.',
                'demo_url'    => 'https://wpeasyelements.com/horizontal-scroll/',
                'docx_url'    => 'https://wpeasyelements.com/docs/horizontal-scroll/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'scrolltrigger_title' => [
                'icon'        => 'easyelIcon-title-scrolltrigger',    
                'title'       => 'Content ScrollTrigger',
                'description' => 'Content ScrollTrigger.',
                'demo_url'    => 'https://wpeasyelements.com/title-scrolltrigger/',
                'docx_url'    => 'https://wpeasyelements.com/docs/title-scrolltrigger/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],            
            'Flip_Box' => [
                'icon'        => 'easyelIcon-flip-box',    
                'title'       => 'Flip Box',
                'description' => 'Flip Box.',
                'demo_url'    => 'https://wpeasyelements.com/flip-box',
                'docx_url'    => 'https://wpeasyelements.com/docs/flip-box',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],         
            'easy_offcanvas' => [
                'icon'        => 'easyelIcon-canvas',    
                'title'       => 'Offcanvas',
                'description' => 'Offcanvas.',
                'demo_url'    => 'https://wpeasyelements.com/offcanvas',
                'docx_url'    => 'https://wpeasyelements.com/docs/offcanvas',
                'is_pro'      => false,
                'group'       => 'Header & Footer Widget',
                'tab' => 'widget',
            ],
            'site_logo' => [
                'icon'        => 'easyelIcon-site-logo',
                'title'       => 'Site Logo',
                'description' => 'Display your website logo easily with this widget.',
                'demo_url'    => 'https://wpeasyelements.com/site-logo/',
                'docx_url'    => 'https://wpeasyelements.com/docs/site-logo/',
                'is_pro'      => false,
                'group'       => 'Header & Footer Widget',
                'tab' => 'widget',
            ],
            'search' => [
                'icon'        => 'easyelIcon-search',
                'title'       => 'Simple Search',
                'description' => 'Search All Content.',
                'demo_url'    => 'https://wpeasyelements.com/search',
                'docx_url'    => 'https://wpeasyelements.com/docs/search',
                'is_pro'      => false,
                'group'       => 'Header & Footer Widget',
                'tab' => 'widget',
            ],
            'navigation_menu' => [
                'icon'        => 'easyelIcon-navigation',
                'title'       => 'Navigation Menu',
                'description' => 'Navigation Menu.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Header & Footer Widget',
                'tab' => 'widget',
            ],
            'page_title' => [
                'icon'        => 'easyelIcon-page-title',
                'title'       => 'Page Title',
                'description' => 'Page Title.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Header & Footer Widget',
                'tab' => 'widget',
            ],
            'post_tags' => [
                'icon'        => 'easyelIcon-post-tag',    
                'title'       => 'Current Post Tags',
                'description' => 'Current Post Tags.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'post_author' => [
                'icon'        => 'easyelIcon-author',    
                'title'       => 'Post Author Info',
                'description' => 'Post Author Info.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'post_title' => [
                'icon'        => 'easyelIcon-post-title',
                'title'       => 'Post Title',
                'description' => 'Post Title.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'post_content' => [
                'icon'        => 'easyelIcon-post-content',
                'title'       => 'Post Content',
                'description' => 'Post Content.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],        
            'excerpt' => [
                'icon'        => 'easyelIcon-post-excerpt',
                'title'       => 'Post Excerpt',
                'description' => 'Post Excerpt.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],  
            'related_post' => [
                'icon'        => 'easyelIcon-related-post',
                'title'       => 'Related Post',
                'description' => 'Related Post.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => true,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ], 
            'post_pagination' => [
                'icon'        => 'easyelIcon-pagination',
                'title'       => 'Post Pagination',
                'description' => 'Post Pagination.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'post_meta' => [
                'icon'        => 'easyelIcon-meta',
                'title'       => 'Post Meta',
                'description' => 'Post Meta.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'post_comments' => [
                'icon'        => 'easyelIcon-comments',
                'title'       => 'Post Comments',
                'description' => 'Post Comments.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'featured_image' => [
                'icon'        => 'easyelIcon-image-carousel',
                'title'       => 'Featured Image',
                'description' => 'Featured Image.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ],
            'easy_scroll_to_top' => [
                'icon'        => 'easyelIcon-scroll-top',
                'title'       => 'Scroll Top',
                'description' => 'Scroll Top.',
                'demo_url'    => 'https://wpeasyelements.com/docs/scroll-to-top/',
                'docx_url'    => 'https://wpeasyelements.com/docs/scroll-to-top/',
                'is_pro'      => false,
                'group'       => 'Theme Builder Widget',
                'tab' => 'widget',
            ], 
            'easy_table' => [
                'icon'        => 'easyelIcon-clients-logo-grid',
                'title'       => 'Table',
                'description' => 'Table.',
                'demo_url'    => 'https://wpeasyelements.com/table',
                'docx_url'    => 'https://wpeasyelements.com/docs/table',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'advance_image' => [
                'icon'        => 'easyelIcon-image-carousel',
                'title'       => 'Advance Image',
                'description' => 'Advance Image Here.',
                'demo_url'    => 'https://wpeasyelements.com/advance-image/',
                'docx_url'    => 'https://wpeasyelements.com/docs/advance-image/',
                'is_pro'      => true,
                'group'       => 'Animations',
                'tab' => 'widget',
            ],
            'bmi_calculator' => [
                'icon'        => 'easyelIcon-calculator',
                'title'       => 'BMI Calculator',
                'description' => 'BMI Calculator.',
                'demo_url'    => 'https://wpeasyelements.com/bmi-calculator/',
                'docx_url'    => 'https://wpeasyelements.com/docs/bmi-calculator/',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],
            'typewriter' => [
                'icon'        => 'easyelIcon-heading',
                'title'       => 'Typewriter',
                'description' => 'Animated typewriter text effect.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => true,
                'group'       => 'Animations',
                'tab' => 'widget',
            ],
            'animated_title' => [
                'icon'        => 'easyelIcon-animated-title',
                'title'       => 'Animated Title',
                'description' => 'Animated title text effect.',
                'demo_url'    => 'https://wpeasyelements.com/animated-title/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => true,
                'group'       => 'Animations',
                'tab' => 'widget',
            ],
            'easytext_animation' => [
                'icon'        => 'easyelIcon-heading',
                'title'       => 'Animated Text',
                'description' => 'Animated text animation effect.',
                'demo_url'    => 'https://wpeasyelements.com/',
                'docx_url'    => 'https://wpeasyelements.com/docs/',
                'is_pro'      => true,
                'group'       => 'Animations',
                'tab' => 'widget',
            ],
            'easy_feature' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Hover Image Box',
                'description' => 'Hover image box content.',
                'demo_url'    => 'https://wpeasyelements.com/hover-image-box/',
                'docx_url'    => 'https://wpeasyelements.com/docs/hover-image-box/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],        
            'easy_gallery' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Simple Gallery',
                'description' => 'Gallery',
                'demo_url'    => 'https://wpeasyelements.com/simple-gallery/',
                'docx_url'    => 'https://wpeasyelements.com/docs/simple-gallery/',
                'is_pro'      => false,
                'tab' => 'widget',
            ],
            'image_gallery_filter' => [
                'icon'        => 'easyelIcon-filterable-gallery',
                'title'       => 'Filterable Gallery',
                'description' => 'filterable Gallery',
                'demo_url'    => 'https://wpeasyelements.com/gallery-filter/',
                'docx_url'    => 'https://wpeasyelements.com/gallery-filter/',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],
            'portfolio_pro' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Portfolio',
                'description' => 'Portfolio',
                'demo_url'    => 'https://wpeasyelements.com/portfolio/',
                'docx_url'    => 'https://wpeasyelements.com/docs/portfolio/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'protected_content' => [
                'icon'        => 'easyelIcon-protected-content',
                'title'       => 'Protected Content',
                'description' => 'This Widget is protected content',
                'demo_url'    => 'https://wpeasyelements.com/protected-contents/',
                'docx_url'    => 'https://wpeasyelements.com/docs/protected-contents/',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],
            'advanced_search' => [
                'icon'        => 'easyelIcon-advance-search',
                'title'       => 'Advanced Search',
                'description' => 'This Widget is advanced search',
                'demo_url'    => 'https://wpeasyelements.com/advanced-search/',
                'docx_url'    => 'https://wpeasyelements.com/docs/advanced-search/',
                'is_pro'      => true,
                'tab' => 'widget',
            ],
            'enable_image_hover_effect' => [
                'icon'        => 'easyelIcon-marquee-logo',
                'title'       => 'Image Hover Effect',
                'description' => 'This Widget is image hover effect',
                'demo_url'    => 'https://wpeasyelements.com/image-hover-effect/',
                'docx_url'    => 'https://wpeasyelements.com/docs/image-hover-effect/',
                'is_pro'      => true,
                'group'       => 'Creative Widgets',
                'tab' => 'widget',
            ],
            'hr_image_scroll' => [
                'icon'        => 'easyelIcon-image-horizontal-scroll',
                'title'       => 'ScrollTrigger',
                'description' => 'This Widget is image hover effect',
                'demo_url'    => 'https://wpeasyelements.com/horizontal-scroll/',
                'docx_url'    => 'https://wpeasyelements.com/docs/horizontal-scroll/',
                'is_pro'      => true,
                'group'       => 'Animations',
                'tab' => 'widget',
            ],
            'archive_post' => [
                'icon'        => 'easyelIcon-post-grid',
                'title'       => 'Archive Post',
                'description' => 'This Widget is archive post widget',
                'demo_url'    => 'https://wpeasyelements.com/post-grid/',
                'docx_url'    => 'https://wpeasyelements.com/docs/post-grid/',
                'is_pro'      => false,
                'tab' => 'widget',
             ],   
            'counter' => [
                'icon'        => 'easyelIcon-counter',
                'title'       => 'Counter',
                'description' => 'This is a widget that counts up.',
                'demo_url'    => 'https://wpeasyelements.com/counter/',
                'docx_url'    => 'https://wpeasyelements.com/docs/counter/',
                'is_pro'      => false,
                'group'       => 'Creative Widgets',
                'tab'         => 'widget',
            ],    
            'countdown' => [
                'icon'        => 'easyelIcon-countdown',
                'title'       => 'Countdown',
                'description' => 'This is a countdown widget.',
                'demo_url'    => 'https://wpeasyelements.com/countdown/',
                'docx_url'    => 'https://wpeasyelements.com/docs/countdown/',
                'is_pro'      => false,
                'group'       => 'Creative Widgets',
                'tab'         => 'widget',
            ],
            'easy_progress' => [
                'icon'        => 'easyelIcon-progress-bar',
                'title'       => 'Progress Bar',
                'description' => 'This is a Progress bar widget.',
                'demo_url'    => 'https://wpeasyelements.com/progressbar/',
                'docx_url'    => 'https://wpeasyelements.com/docs/progressbar/',
                'is_pro'      => false,
                'group'       => 'Creative Widgets',
                'tab'         => 'widget',
            ],            
            'facebook_feed' => [
                'icon'        => 'easyelIcon-facebook-feed',
                'title'       => 'Facebook Feed',
                'description' => 'This Widget is facebook feeds',
                'demo_url'    => 'https://wpeasyelements.com/facebook-feed/',
                'docx_url'    => 'https://wpeasyelements.com/docs/facebook-feed/',
                'is_pro'      => true,
                'group'       => 'Social Media Feeds',
                'tab' => 'widget',
            ],
            'instagram_feed' => [
                'icon'        => 'easyelIcon-instagram-feed',
                'title'       => 'Instagram Feed',
                'description' => 'This Widget is instagram feeds',
                'demo_url'    => 'https://wpeasyelements.com/instagram-feed/',
                'docx_url'    => 'https://wpeasyelements.com/docs/instagram-feed/',
                'is_pro'      => true,
                'group'       => 'Social Media Feeds',
                'tab' => 'widget',
            ],
            'login_register' => [
                'icon'        => 'easyelIcon-login',
                'title'       => 'Login / Register',
                'description' => 'This Widget is login and register form',
                'demo_url'    => 'https://wpeasyelements.com/register/',
                'docx_url'    => 'https://wpeasyelements.com/docs/login-register/',
                'is_pro'      => false,
                'group'       => 'Form Widgets',
                'tab' => 'widget',
            ], 
        ];
        return apply_filters( 'easyel_available_widgets', $widgets );
    }

    /**
     * Admin page HTML
     */
    function easyel_custom_fonts_page_html() {
        if ( ! current_user_can( 'manage_options' ) ) return;

        if ( ! defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) || ! EASY_ELEMENTS_PRO_ACTIVE ) {
            echo '<div class="wrap"><h1>' . esc_html__( 'Upload Custom Fonts', 'easy-elements' ) . '</h1>';
            echo '<p>' . esc_html__( 'This feature is available in Easy Elements Pro. Please install and activate the Pro version to use it.', 'easy-elements' ) . '</p>';
            echo '</div>';
            return;
        }

        easyel_pro_custom_fonts_page();
    }

    /**
     * Hide admin notices on the Easy Elements dashboard page.
     */
    function easyel_hide_admin_notices() {
        $screen = get_current_screen();

        if ( $screen && 'toplevel_page_easy-elements-dashboard' === $screen->id ) {

            $custom_css = '
                /* Hide all common notices */
                .notice,
                .updated,
                .error,
                .update-nag,
                .notice-success,
                .notice-error,
                .notice-warning {
                    display: none !important;
                }

                /* But allow EasyEL notice */
                .easyel-promo-notice {
                    display: block !important;
                }
            ';

            $handle = 'easyel-admin-hide-notices';
            wp_register_style( $handle, false, [], EASYELEMENTS_VER );
            wp_enqueue_style( $handle );
            wp_add_inline_style( $handle, $custom_css );
        }
    }

    public function easyel_smooth_scroller_popup_display() {

        $options = get_option('easyel_scroll_smoother_settings', []);

        ?>
        <div class="easyel-smooth-scroll-popup">
            <div class="ajax-search-close-icon">
                <a class="easyel-smooth-scroll-popup-close-icon rbt-round-btn" href="#">
                    <svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M9.08366 1.73916L8.26116 0.916656L5.00033 4.17749L1.73949 0.916656L0.916992 1.73916L4.17783 4.99999L0.916992 8.26082L1.73949 9.08332L5.00033 5.82249L8.26116 9.08332L9.08366 8.26082L5.82283 4.99999L9.08366 1.73916Z" fill="currentColor"></path>
                    </svg>
                </a>
            </div>

            <div class="wrapper">
                <h2 class="easyel-smooth-scroll-heading">Smooth Scroll Settings</h2>
                <form method="post" action="">
                    <div class="easyel-smooth-scroll-settings-main-wrapper">

                        <!-- Smooth Speed -->
                        <div class="easyel-smooth-scroll-item">
                            <span class="easy-field-label">Speed (2.0–5):</span>
                            <label class="easy-field-item">
                                <input type="number" 
                                    name="smooth_scroll_speed" 
                                    min="0.1" max="5" step="0.1"
                                    value="<?php echo isset($options['smooth_scroll_speed']) ? esc_attr($options['smooth_scroll_speed']) : '2.0'; ?>">
                            </label>
                        </div>

                        <!-- Normalize Scroll -->
                        <div class="easyel-smooth-scroll-item">
                            <span class="easy-field-label">Normalize Scroll</span>
                            <label class="easy-field-item easy-toggle-switch">
                                <input type="checkbox" 
                                    name="smooth_scroll_normalize" 
                                    value="1"
                                    <?php checked( isset($options['smooth_scroll_normalize']) ? $options['smooth_scroll_normalize'] : 1, 1 ); ?>>
                                <span class="slider round"></span>
                            </label>
                        </div>

                        <!-- Enable on Mobile -->
                        <div class="easyel-smooth-scroll-item">
                            <span class="easy-field-label">Enable on Mobile Devices</span>
                            <label class="easy-field-item easy-toggle-switch">
                                <input type="checkbox" 
                                    name="smooth_scroll_enable_mobile" 
                                    value="1"
                                    <?php checked( isset($options['smooth_scroll_enable_mobile']) ? $options['smooth_scroll_enable_mobile'] : 0, 1 ); ?>>
                                <span class="slider round"></span>
                            </label>
                        </div>

                        <!-- Disable on Editor Mode -->
                        <div class="easyel-smooth-scroll-item">
                            <span class="easy-field-label">Disable on Editor Mode</span>
                            <label class="easy-field-item easy-toggle-switch">
                                <input type="checkbox" 
                                    name="smooth_scroll_disable_editor_mode" 
                                    value="1"
                                    <?php checked( isset($options['smooth_scroll_disable_editor_mode']) ? $options['smooth_scroll_disable_editor_mode'] : 0, 1 ); ?>>
                                <span class="slider round"></span>
                            </label>
                        </div>

                    </div>

                    <div class="easyel-smooth-scroll-save">
                        <input type="submit" 
                            class="smooth_scroll_popup_item_save" 
                            name="smooth_scroll_popup_item_save"
                            value="<?php echo esc_attr__('Save Changes', 'easy-elements'); ?>">
                    </div>
                </form>
            </div>

        </div>
        <?php
    }

    public function easyel_smooth_scroller_popup_callback() {
        $this->easyel_smooth_scroller_popup_display();
    }

    function save_smooth_scroll_settings() {

        // Permission check
        if ( ! current_user_can('manage_options') ) {
            wp_send_json_error(__('Unauthorized', 'easy-elements'));
        }

        // Nonce check
        check_ajax_referer('easy_elements_nonce', 'nonce');

        if ( ! isset($_POST['settings']) ) {
            wp_send_json_error(['message' => 'No settings received']);
        }

        // Sanitize deeply
        $settings = map_deep(  wp_unslash( $_POST['settings'] ), 'sanitize_text_field');

        // Save all settings under one option name
        update_option('easyel_scroll_smoother_settings', $settings);

        wp_send_json_success(['message' => 'Saved successfully']);
    }

}

// Initialize the plugin
Easyel_Elements::get_instance();
```
