PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.2.8
Easy Elements for Elementor – Addons & Website Templates v1.2.8
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / includes / Admin / Admin_Settings.php

Admin_Settings.php in Easy Elements for Elementor – Addons & Website Templates 1.2.8, at includes/Admin/Admin_Settings.php

1,482 lines 67.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Easyel\EasyElements\Admin;
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 class Admin_Settings {
8
9 // Singleton instance
10 private static $instance = null;
11
12 private function __construct() {
13 // Hooks
14
15 // Custom Font Load Free
16
17 add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu' ) );
18 add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu2' ) ,999 );
19 add_action( 'admin_init', array( $this, 'easyel_elements_register_settings' ) );
20
21 add_action( 'easyel_smooth_scroller_popup', array( $this, 'easyel_smooth_scroller_popup_callback' ), 5 );
22
23 $this->easyel_settings_ajax();
24
25 }
26
27 public function easyel_settings_ajax( ) {
28
29 // AJAX handler for saving minify js option
30
31 add_action('wp_ajax_easy_elements_save_widget_setting', array( $this, "easy_elements_save_widget_setting" ) );
32 add_action('wp_ajax_easy_elements_bulk_action', array( $this, 'easy_elements_bulk_action') );
33
34 add_action('wp_ajax_easy_elements_save_global_extensions', array( $this, 'easy_elements_save_global_extensions') ) ;
35 add_action('wp_ajax_easy_elements_save_global_extensions_bulk', array( $this, 'easy_elements_save_global_extensions_bulk') ) ;
36
37 add_action('wp_ajax_easy_elements_bulk_group_action', [$this, 'easy_elements_bulk_group_action']);
38
39 add_action('admin_enqueue_scripts', array( $this, 'easyel_elements_enqueue_admin_assets') );
40 add_action( 'admin_head', array( $this, 'easyel_hide_admin_notices' ) );
41
42 add_action('wp_ajax_easyel_save_user_data', array( $this, 'easyel_save_user_data_callback') );
43
44 add_action('wp_ajax_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings'));
45 add_action('wp_ajax_nopriv_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings') );
46
47 }
48
49 // Singleton get_instance
50 public static function get_instance() {
51 if (self::$instance === null) {
52 self::$instance = new self();
53 }
54 return self::$instance;
55 }
56
57 public function easyel_save_user_data_callback() {
58
59 check_ajax_referer('easy_elements_nonce', 'security');
60
61 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
62 $posted = $_POST['settings'] ?? [];
63 $settings = map_deep( wp_unslash( $posted ), 'sanitize_text_field' );
64
65 update_option( 'easy_element_user_data', $settings );
66
67 wp_send_json_success(['message' => 'Saved successfully!']);
68 }
69
70 public function easyel_elements_settings_menu() {
71
72 // Main Menu
73 add_menu_page(
74 __('Easy Elements', 'easy-elements'),
75 __('Easy Elements', 'easy-elements'),
76 'manage_options',
77 'easy-elements-dashboard',
78 array( $this, 'easyel_elements_settings_callback' ),
79 'dashicons-admin-generic',
80 59
81 );
82
83 global $submenu;
84
85 // Main slug
86 $slug = 'easy-elements-dashboard';
87
88 $submenu[$slug][] = [ __('Overview', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#overview' ];
89 $submenu[$slug][] = [ __('Widgets', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#widget' ];
90 $submenu[$slug][] = [ __('All Extensions', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#extensions' ];
91
92 // Header & Footer Submenu
93 add_submenu_page(
94 'easy-elements-dashboard',
95 __('Header & Footer', 'easy-elements'),
96 __('Header & Footer', 'easy-elements'),
97 'manage_options',
98 'edit.php?post_type=ee-elementor-hf'
99 );
100
101 // Upload Custom Fonts Submenu
102 add_submenu_page(
103 'easy-elements-dashboard',
104 __('Upload Custom Fonts', 'easy-elements'),
105 __('Upload Custom Fonts', 'easy-elements'),
106 'manage_options',
107 'easyel-custom-fonts',
108 array( $this, 'easyel_custom_fonts_page_html' )
109 );
110
111 // Off Canvas Submenu
112 add_submenu_page(
113 'easy-elements-dashboard',
114 __('Off Canvas', 'easy-elements'),
115 __('Off Canvas', 'easy-elements'),
116 'manage_options',
117 'edit.php?post_type=easy-offcanvas'
118 );
119
120 $flush_needed = get_option( 'easyel_flush_rewrite_rules', true );
121
122 if ( $flush_needed ) {
123 flush_rewrite_rules(); // Flush permalink
124 update_option( 'easyel_flush_rewrite_rules', false ); // Mark as flushed
125 }
126
127
128 }
129
130 public function easyel_elements_settings_menu2() {
131
132 global $submenu;
133
134 // Main slug
135 $slug = 'easy-elements-dashboard';
136 /**
137 * ----------------------------------------
138 * Activate License
139 * ----------------------------------------
140 */
141 if ( defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) && EASY_ELEMENTS_PRO_ACTIVE ) {
142 $submenu[ $slug ][] = [
143 __( 'Activate License', 'easy-elements' ),
144 'manage_options',
145 'admin.php?page=' . $slug . '#activate_license',
146 ];
147 }
148 }
149
150 public function easyel_elements_register_settings() {
151 register_setting( 'easyel_elements_extensions_group', 'easyel_enable_js_animation', [
152 'sanitize_callback' => 'absint',
153 'default' => 0,
154 ] );
155
156 // Cursor setting register
157 register_setting( 'easyel_elements_extensions_group', 'easyel_enable_cursor', [
158 'sanitize_callback' => 'absint',
159 'default' => 0,
160 ] );
161 }
162
163 public function easy_elements_bulk_group_action() {
164
165 if (!current_user_can('manage_options')) {
166 wp_send_json_error(__('Unauthorized', 'easy-elements'));
167 }
168
169 check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce');
170
171 $group = isset($_POST['group']) ? sanitize_text_field(wp_unslash($_POST['group'])) : '';
172 $tab = isset($_POST['tab']) ? sanitize_text_field(wp_unslash($_POST['tab'])) : 'widget';
173 $status = isset($_POST['status']) && $_POST['status'] == 1 ? '1' : '0';
174
175 $available_elements = $this->easyel_elements_get_available_widgets();
176 $updated_count = 0;
177
178 $is_pro_active = class_exists('Easy_Elements_Pro');
179
180 foreach ($available_elements as $key => $widget) {
181
182 if (!isset($widget['tab']) || $widget['tab'] !== $tab) {
183 continue;
184 }
185
186 $group_slug = strtolower(trim($group));
187
188 $widget_group = isset( $widget['group'] ) ? $widget['group'] : 'General Widgets';
189
190 $widget_group_slug = strtolower(trim(str_replace(' ', '-', $widget_group ) ) );
191
192 if ($widget_group_slug !== $group_slug) {
193 continue;
194 }
195
196 $option_name = 'easy_element_' . $tab . '_' . $key;
197
198 if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) {
199 update_option($option_name, '0');
200 } else {
201 update_option($option_name, $status);
202 }
203
204 $updated_count++;
205 }
206
207 wp_send_json_success([
208 'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'),
209 'count' => $updated_count,
210 'is_pro_active' => $is_pro_active,
211 'status' => $status
212 ]);
213 }
214
215 public function easy_elements_save_global_extensions_bulk() {
216 if ( ! current_user_can( 'manage_options' ) ) {
217 wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) );
218 }
219
220 check_ajax_referer( 'easy_elements_widget_settings_nonce', 'nonce' );
221
222 $tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions';
223 $keys = isset( $_POST['keys'] ) ? array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['keys'] ) ) : [];
224 $status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0;
225 $group_slug = isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : '';
226
227 if ( empty( $keys ) ) {
228 wp_send_json_error( [ 'message' => __( 'No keys provided', 'easy-elements' ) ] );
229 }
230
231 $settings = get_option( 'easy_element_' . $tab, [] );
232
233 foreach ( $keys as $key ) {
234 $key = sanitize_text_field( $key );
235 $settings[ $key ] = $status;
236 }
237
238 update_option( 'easy_element_' . $tab, $settings );
239
240 if ( $group_slug ) {
241 update_option( 'easy_element_group_' . $group_slug, $status );
242 }
243
244 wp_send_json_success( [ 'message' => __( 'Bulk settings updated', 'easy-elements' ) ] );
245 }
246
247 public function easy_elements_save_global_extensions() {
248 if (!current_user_can('manage_options')) {
249 wp_send_json_error(__('Unauthorized', 'easy-elements'));
250 }
251
252 check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce');
253
254 $tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions';
255 $key = isset($_POST['key']) ? sanitize_text_field( wp_unslash( $_POST['key'] )) : '';
256 $status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0;
257
258 if (!$key) {
259 wp_send_json_error(['message' => __('Invalid key', 'easy-elements')]);
260 }
261
262 $settings = get_option('easy_element_' . $tab, []);
263 $settings[$key] = $status;
264
265 update_option('easy_element_' . $tab, $settings);
266
267 wp_send_json_success(['message' => __('Settings updated', 'easy-elements')]);
268 }
269
270
271 // AJAX handler for saving individual widget settings
272
273 public function easy_elements_save_widget_setting() {
274 if (!current_user_can('manage_options')) {
275 wp_send_json_error(__('Unauthorized', 'easy-elements'));
276 }
277 check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce');
278
279 $widget_key = isset($_POST['widget_key']) ? sanitize_text_field( wp_unslash($_POST['widget_key'] ) ) : '';
280 $status = isset($_POST['status']) && $_POST['status'] === '1' ? '1' : '0';
281 $tab_slug = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget';
282
283 if (!empty( $widget_key ) ) {
284 $option_name = 'easy_element_' . $tab_slug . '_' . $widget_key;
285
286 update_option($option_name, $status);
287
288 wp_send_json_success([
289 'message' => __('Widget setting updated successfully', 'easy-elements'),
290 'status' => $status,
291 ]);
292 } else {
293 wp_send_json_error(['message' => __('Invalid widget key', 'easy-elements')]);
294 }
295 }
296
297 // AJAX handler for bulk actions
298 public function easy_elements_bulk_action() {
299 if (!current_user_can('manage_options')) {
300 wp_send_json_error(__('Unauthorized', 'easy-elements'));
301 }
302 check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce');
303
304 $bulk_action = isset($_POST['bulk_action']) ? sanitize_text_field(wp_unslash($_POST['bulk_action'])) : '';
305 $tab = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget';
306 $status = $bulk_action === 'activate_all' ? '1' : '0';
307
308 $available_elements = $this->easyel_elements_get_available_widgets();
309 $updated_count = 0;
310
311 $is_pro_active = class_exists('Easy_Elements_Pro');
312
313 foreach ($available_elements as $key => $widget) {
314 if (isset($widget['tab']) && $widget['tab'] === $tab) {
315 $option_name = 'easy_element_' . $tab . '_' . $key;
316
317 if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) {
318 update_option($option_name, '0');
319 } else {
320 $status = $bulk_action === 'activate_all' ? '1' : '0';
321 update_option($option_name, $status);
322 }
323 }
324 }
325
326 wp_send_json_success([
327 'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'),
328 'count' => $updated_count,
329 'is_pro_active' => $is_pro_active
330 ]);
331 }
332
333
334 function easyel_elements_settings_callback() {
335 $available_elements = $this->easyel_elements_get_available_widgets();
336
337 $easyel_tabs = [
338 'overview' => __('Overview', 'easy-elements'),
339 'widget' => __('All Widgets', 'easy-elements'),
340 'extensions' => __('All Extensions', 'easy-elements'),
341 'advsettings' => __('Advanced Settings', 'easy-elements'),
342 'userData' => __('API Settings', 'easy-elements'),
343
344 ];
345
346 if ( defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) && EASY_ELEMENTS_PRO_ACTIVE ) {
347 $easyel_tabs['activate_license'] = __('Activate License', 'easy-elements');
348 }
349
350 $easyel_tab_list = apply_filters("easyel_all_tab_list", $easyel_tabs );
351
352 ?>
353 <div class="easyel-plugin-main-settings-page">
354 <div class="easyel-saving-indicator">
355 Saving...
356 </div>
357 <div class="easyel-overview-header">
358 <img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'includes/Admin/img/easy-logo.png' ); ?>" alt="<?php echo esc_attr( 'logo' ); ?>">
359
360 </div>
361 <div class=" easyel-plugin-settings-wrapper">
362 <div class="easyel-nav-tab-item">
363 <div class="easyel-nav-tab-wrapper easyel-border-radius-20">
364 <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>
365 <a href="#widget" class="easyel-nav-tab" data-tab="widget"><i class="easyelIcon-widgets"></i><?php esc_html_e('All Widgets','easy-elements'); ?></a>
366 <a href="#extensions" class="easyel-nav-tab" data-tab="extensions"><i class="easyelIcon-extension"></i><?php esc_html_e('All Extensions','easy-elements'); ?></a>
367 <a href="#userData" class="easyel-nav-tab" data-tab="userData"><i class="easyelIcon-setting"></i><?php esc_html_e('API Settings','easy-elements'); ?></a>
368 <?php if ( defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) && EASY_ELEMENTS_PRO_ACTIVE ) : ?>
369 <a href="#activate_license" class="easyel-nav-tab" data-tab="activate_license"><i class="easyelIcon-license-pro"></i><?php esc_html_e('Activate License','easy-elements'); ?></a>
370 <?php endif; ?>
371 <div class="easyel-tab-pro-link">
372 <a href="https://wpeasyelements.com/pricing/" class="easyel-nav-tab-pro" target="_blank">
373 <i class="easyelIcon-crown"></i>
374 <?php esc_html_e('Go Premium','easy-elements'); ?>
375 </a>
376 </div>
377 </div>
378 </div>
379 <!-- Status Messages -->
380 <div id="bulk-action-message" class="notice" style="display: none;"></div>
381
382 <!-- Tab Content -->
383 <div id="easyel-tab-content">
384 <?php foreach ( $easyel_tabs as $tab_slug => $tab_label ) : ?>
385 <div id="tab-<?php echo esc_attr($tab_slug); ?>"
386 class="easyel-tab-panel easyel-border-radius-20 <?php echo esc_attr($tab_slug); ?>"
387 style="<?php echo $tab_slug === 'overview' ? '' : 'display:none;'; ?>">
388
389 <?php
390 if ( $tab_slug === 'widget' ) : ?>
391 <div class="easyel-addon-search easyel-dflex easyel-justify-between">
392 <div class="easyel-widget-filter">
393 <h1 class="easyel-dashboard-heading"><?php esc_html_e('Widgets','easy-elements');?></h1>
394 <div class="easyel-widget-filter-button">
395 <button type="button" id="easyel_all" class="easyel-action-btn active" data-filter="easyel_all"><?php esc_html_e('All', 'easy-elements'); ?></button>
396 <button type="button" id="easyel_free" class="easyel-action-btn" data-filter="easyel_free"><?php esc_html_e('Free', 'easy-elements'); ?></button>
397 <button type="button" id="easyel_pro" class="easyel-action-btn" data-filter="easyel_pro"><?php esc_html_e('Pro', 'easy-elements'); ?></button>
398 </div>
399 </div>
400 <div class="easyel-widget-search-enable">
401 <div class="easyel-widget-activeDeactivate-button">
402 <button type="button" id="activate-all-btn"><?php esc_html_e('Activate All', 'easy-elements'); ?></button>
403 <button type="button" id="deactivate-all-btn"><?php esc_html_e('Deactivate All', 'easy-elements'); ?></button>
404 </div>
405 <?php if ( $tab_slug === 'widget' ) { ?>
406 <input type="text" id="element-search" placeholder="<?php esc_attr_e('Search widgets...', 'easy-elements'); ?>">
407 <?php } ?>
408 </div>
409 </div>
410 <?php endif; ?>
411 <?php
412
413 $tab_file = EASYELEMENTS_DIR_PATH . 'includes/Admin/settingstab/tab-' . $tab_slug . '.php';
414
415 if ( file_exists( $tab_file ) ) {
416 include $tab_file;
417 }
418
419 $pro_version = easyel_get_pro_clean_version();
420
421 if (
422 $pro_version &&
423 version_compare( $pro_version, '1.0.8', '>=' )
424 ) {
425 if (
426 did_action( 'plugins_loaded' ) &&
427 class_exists( '\EasyElements_Elementor\Pro\Licenses\EasyelLicense' ) &&
428 $tab_slug === 'activate_license'
429 ) {
430 $manager = \EasyElements_Elementor\Pro\Licenses\EasyelLicense::get_instance();
431
432 if ( method_exists( $manager, 'license_page_html' ) ) {
433 $manager->license_page_html();
434 }
435 }
436
437 } else {
438 if (
439 did_action( 'plugins_loaded' ) &&
440 class_exists( '\Easyel_License_Manager' ) &&
441 $tab_slug === 'activate_license'
442 ) {
443 $manager = new \Easyel_License_Manager();
444 if ( method_exists( $manager, 'license_page_html' ) ) {
445 $manager->license_page_html();
446 }
447 }
448 }
449
450
451
452
453 ?>
454 </div>
455 <?php endforeach; ?>
456 </div>
457
458 </div>
459 </div>
460
461 <!-- JavaScript functionality is handled by admin.js -->
462 <?php
463 }
464
465 ////////****************** AJAX Toggle ********************************
466
467 public function Easyel_Elements_enqueue_admin_assets($hook) {
468 if (strpos($hook, 'easy-elements') === false) {
469 return;
470 }
471
472 // Enqueue admin JavaScript
473 wp_enqueue_script(
474 'easy-elements-admin',
475 EASYELEMENTS_DIR_URL . 'assets/js/admin.js',
476 ['jquery'],
477 '1.0.0',
478 true
479 );
480
481
482 // Localize script with all necessary data
483 wp_localize_script('easy-elements-admin', 'easyElementsData', [
484 'ajaxurl' => admin_url('admin-ajax.php'),
485 'nonce' => wp_create_nonce('easy_elements_nonce'),
486 'widget_settings_nonce' => wp_create_nonce('easy_elements_widget_settings_nonce'),
487 'bulk_action_nonce' => wp_create_nonce('easy_elements_bulk_action_nonce'),
488 'advance_settings_nonce' => wp_create_nonce('easy_elements_save_advance_settings_nonce'),
489 'js_animation_nonce' => wp_create_nonce('easyel_js_animation_nonce'),
490 'strings' => [
491 'confirm_activate_all' => __('Are you sure you want to activate all widgets?', 'easy-elements'),
492 'confirm_deactivate_all' => __('Are you sure you want to deactivate all widgets?', 'easy-elements'),
493 'processing' => __('Processing...', 'easy-elements'),
494 'saving' => __('Saving...', 'easy-elements'),
495 'saved' => __('Saved!', 'easy-elements'),
496 'error' => __('Error!', 'easy-elements'),
497 'updated' => __('Updated!', 'easy-elements'),
498 ]
499 ]);
500 }
501
502 function easyel_elements_get_available_widgets() {
503 $widgets = [
504 'heading' => [
505 'icon' => 'easyelIcon-heading',
506 'title' => 'Heading',
507 'description' => 'Add customizable headings with style options.',
508 'demo_url' => 'https://wpeasyelements.com/heading/',
509 'docx_url' => 'https://wpeasyelements.com/docs/heading/',
510 'is_pro' => false,
511 'tab' => 'widget',
512 ],
513 'clients_logo' => [
514 'icon' => 'easyelIcon-clients-logo-grid',
515 'title' => 'Clients Logo Grid',
516 'description' => 'Showcase client logos in a neat grid layout.',
517 'demo_url' => 'https://wpeasyelements.com/clients-logo-grid/',
518 'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-grid',
519 'is_pro' => false,
520 'tab' => 'widget',
521 ],
522 'clients_logo_slider' => [
523 'icon' => 'easyelIcon-clients-logo-slider',
524 'title' => 'Clients Logo Slider',
525 'description' => 'Display client logos in a slider format.',
526 'demo_url' => 'https://wpeasyelements.com/clients-logo-slider/',
527 'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-slider/',
528 'is_pro' => true,
529 'group' => 'Creative Widgets',
530 'tab' => 'widget',
531 ],
532 'simple_tab' => [
533 'icon' => 'easyelIcon-tab',
534 'title' => 'Tab',
535 'description' => 'Add simple tab content.',
536 'demo_url' => 'https://wpeasyelements.com/tab',
537 'docx_url' => 'https://wpeasyelements.com/docs/tab',
538 'is_pro' => false,
539 'tab' => 'widget',
540 ],
541 'tab_advance' => [
542 'icon' => 'easyelIcon-tab',
543 'title' => 'Advanced Tab',
544 'description' => 'Create advanced tab content.',
545 'demo_url' => 'https://wpeasyelements.com/advanced-tab/',
546 'docx_url' => 'https://wpeasyelements.com/docs/advanced-tab/',
547 'is_pro' => true,
548 'tab' => 'widget',
549 ],
550 'testimonials' => [
551 'icon' => 'easyelIcon-testimonials-grid',
552 'title' => 'Testimonials Grid',
553 'description' => 'Show testimonials in a grid format.',
554 'demo_url' => 'https://wpeasyelements.com/testimonials-grid',
555 'docx_url' => 'https://wpeasyelements.com/docs/testimonials-grid',
556 'is_pro' => false,
557 'tab' => 'widget',
558 ],
559 'testimonials_slider' => [
560 'icon' => 'easyelIcon-testimonials-slider',
561 'title' => 'Testimonials Slider',
562 'description' => 'Display testimonials in a slider format.',
563 'demo_url' => 'https://wpeasyelements.com/testimonials-slider/',
564 'docx_url' => 'https://wpeasyelements.com/docs/testimonials-slider/',
565 'is_pro' => true,
566 'tab' => 'widget',
567 ],
568 'image_carousel' => [
569 'icon' => 'easyelIcon-image-carousel',
570 'title' => 'Image Carousel',
571 'description' => 'Create an image slider with multiple images.',
572 'demo_url' => 'https://wpeasyelements.com/image-carousel/',
573 'docx_url' => 'https://wpeasyelements.com/docs/image-carousel',
574 'is_pro' => true,
575 'tab' => 'widget',
576 ],
577 'image_reveal' => [
578 'icon' => 'easyelIcon-marquee-logo',
579 'title' => 'Reveal Image',
580 'description' => 'reveal Image Here',
581 'demo_url' => 'https://wpeasyelements.com/reveal-image/',
582 'docx_url' => 'https://wpeasyelements.com/docs/reveal-image/',
583 'is_pro' => true,
584 'tab' => 'widget',
585 ],
586 'rotate_text' => [
587 'icon' => 'easyelIcon-heading',
588 'title' => 'Rotate Text',
589 'description' => 'rotate text here',
590 'demo_url' => 'https://wpeasyelements.com/rotate-text/',
591 'docx_url' => 'https://wpeasyelements.com/docs/rotate-text/',
592 'is_pro' => true,
593 'tab' => 'widget',
594 ],
595 'icon_box' => [
596 'icon' => 'easyelIcon-iconbox',
597 'title' => 'Info Box',
598 'description' => 'Display content with an icon.',
599 'demo_url' => 'https://wpeasyelements.com/info-box',
600 'docx_url' => 'https://wpeasyelements.com/docs/info-box',
601 'is_pro' => false,
602 'tab' => 'widget',
603 ],
604 'process_grid' => [
605 'icon' => 'easyelIcon-process-grid',
606 'title' => 'Process Grid',
607 'description' => 'Show process steps in a grid format.',
608 'demo_url' => 'https://wpeasyelements.com/process-grid',
609 'docx_url' => 'https://wpeasyelements.com/docs/process-grid',
610 'is_pro' => false,
611 'tab' => 'widget',
612 ],
613 'process_slider' => [
614 'icon' => 'easyelIcon-process-slider',
615 'title' => 'Process Slider',
616 'description' => 'Show process steps in a slider.',
617 'demo_url' => 'https://wpeasyelements.com/process-slider/',
618 'docx_url' => 'https://wpeasyelements.com/docs/process-slider/',
619 'is_pro' => true,
620 'tab' => 'widget',
621 ],
622 'team_grid' => [
623 'icon' => 'easyelIcon-team-grid',
624 'title' => 'Team Grid',
625 'description' => 'Display team members in a grid format.',
626 'demo_url' => 'https://wpeasyelements.com/team-grid',
627 'docx_url' => 'https://wpeasyelements.com/docs/team-grid',
628 'is_pro' => false,
629 'tab' => 'widget',
630 ],
631 'team_slider' => [
632 'icon' => 'easyelIcon-team-slider',
633 'title' => 'Team Slider',
634 'description' => 'Showcase team members in a slider format.',
635 'demo_url' => 'https://wpeasyelements.com/team-slider',
636 'docx_url' => 'https://wpeasyelements.com/docs/team-slider',
637 'is_pro' => true,
638 'tab' => 'widget',
639 ],
640 'contact_box' => [
641 'icon' => 'easyelIcon-contact-box',
642 'title' => 'Contact Box',
643 'description' => 'Contact Box.',
644 'demo_url' => 'https://wpeasyelements.com/contact-box',
645 'docx_url' => 'https://wpeasyelements.com/docs/contact-box',
646 'is_pro' => false,
647 'tab' => 'widget',
648 ],
649 'icon_box_slider' => [
650 'icon' => 'easyelIcon-icon-box-slider',
651 'title' => 'Info Box Slider',
652 'description' => 'Info Box Slider.',
653 'demo_url' => 'https://wpeasyelements.com/info-box-slider/',
654 'docx_url' => 'https://wpeasyelements.com/docs/info-box-slider/',
655 'is_pro' => true,
656 'tab' => 'widget',
657 ],
658 'timeline_slider' => [
659 'icon' => 'easyelIcon-timeline-slider',
660 'title' => 'Timeline Slider',
661 'description' => 'Timeline Slider.',
662 'demo_url' => 'https://wpeasyelements.com/timeline-slider/',
663 'docx_url' => 'https://wpeasyelements.com/docs/timeline-slider',
664 'is_pro' => true,
665 'group' => 'Creative Widgets',
666 'tab' => 'widget',
667 ],
668 'faq' => [
669 'icon' => 'easyelIcon-faq-1',
670 'title' => 'FAQ',
671 'description' => 'FAQ.',
672 'demo_url' => 'https://wpeasyelements.com/faq',
673 'docx_url' => 'https://wpeasyelements.com/docs/faq',
674 'is_pro' => false,
675 'tab' => 'widget',
676 ],
677 'blog_grid' => [
678 'icon' => 'easyelIcon-post-grid',
679 'title' => 'Post Grid',
680 'description' => 'Post.',
681 'demo_url' => 'https://wpeasyelements.com/post-grid',
682 'docx_url' => 'https://wpeasyelements.com/docs/post-grid',
683 'is_pro' => false,
684 'tab' => 'widget',
685 ],
686 'post_slider' => [
687 'icon' => 'easyelIcon-post-slider',
688 'title' => 'Post Slider',
689 'description' => 'Post Slider.',
690 'demo_url' => 'https://wpeasyelements.com/post-slider/',
691 'docx_url' => 'https://wpeasyelements.com/docs/post-slider/',
692 'is_pro' => true,
693 'tab' => 'widget',
694 ],
695 'easy_cf7' => [
696 'icon' => 'easyelIcon-contact-form',
697 'title' => 'Contact Form 7',
698 'description' => 'Contact form 7.',
699 'demo_url' => 'https://wpeasyelements.com/contact-form-7',
700 'docx_url' => 'https://wpeasyelements.com/docs/contact-form-7',
701 'is_pro' => false,
702 'tab' => 'widget',
703 ],
704 'video' => [
705 'icon' => 'easyelIcon-video',
706 'title' => 'Video',
707 'description' => 'Video.',
708 'demo_url' => 'https://wpeasyelements.com/video',
709 'docx_url' => 'https://wpeasyelements.com/docs/video',
710 'is_pro' => false,
711 'tab' => 'widget',
712 ],
713 'pricing_table' => [
714 'icon' => 'easyelIcon-pricing-table',
715 'title' => 'Pricing Table',
716 'description' => 'Pricing Table.',
717 'demo_url' => 'https://wpeasyelements.com/pricing-table',
718 'docx_url' => 'https://wpeasyelements.com/docs/pricing-table',
719 'is_pro' => false,
720 'group' => 'Marketing Widgets',
721 'tab' => 'widget',
722 ],
723 'pricing_list' => [
724 'icon' => 'easyelIcon-pricing-list',
725 'title' => 'Pricing List',
726 'description' => 'Pricing List.',
727 'demo_url' => 'https://wpeasyelements.com/pricing-list/',
728 'docx_url' => 'https://wpeasyelements.com/docs/pricing-list/',
729 'is_pro' => true,
730 'group' => 'Marketing Widgets',
731 'tab' => 'widget',
732 ],
733 'pricing_tab' => [
734 'icon' => 'easyelIcon-pricing-table',
735 'title' => 'Pricing Tab',
736 'description' => 'Pricing Tab.',
737 'demo_url' => 'https://wpeasyelements.com/pricing-tab/',
738 'docx_url' => 'https://wpeasyelements.com/docs/pricing-tab/',
739 'is_pro' => true,
740 'group' => 'Marketing Widgets',
741 'tab' => 'widget',
742 ],
743 'service_list' => [
744 'icon' => 'easyelIcon-service-list',
745 'title' => 'Service List',
746 'description' => 'Service List.',
747 'demo_url' => 'https://wpeasyelements.com/service-list',
748 'docx_url' => 'https://wpeasyelements.com/docs/service-list/',
749 'is_pro' => false,
750 'tab' => 'widget',
751 ],
752 'advance_service' => [
753 'icon' => 'easyelIcon-service-list',
754 'title' => 'Advance Service',
755 'description' => 'Advance Service.',
756 'demo_url' => 'https://wpeasyelements.com/advance-service',
757 'docx_url' => 'https://wpeasyelements.com/docs/advance-service/',
758 'is_pro' => true,
759 'tab' => 'widget',
760 ],
761 'feature_list' => [
762 'icon' => 'easyelIcon-service-list',
763 'title' => 'Feature List',
764 'description' => 'Feature List.',
765 'demo_url' => 'https://wpeasyelements.com/features-list',
766 'docx_url' => 'https://wpeasyelements.com/docs/features-list/',
767 'is_pro' => false,
768 'tab' => 'widget',
769 ],
770 'process_list' => [
771 'icon' => 'easyelIcon-process-list',
772 'title' => 'Process List',
773 'description' => 'Process List.',
774 'demo_url' => 'https://wpeasyelements.com/process-list/',
775 'docx_url' => 'https://wpeasyelements.com/docs/process-list/',
776 'is_pro' => false,
777 'tab' => 'widget',
778 ],
779 'marquee_logo' => [
780 'icon' => 'easyelIcon-marquee-logo',
781 'title' => 'Marquee',
782 'description' => 'Marquee.',
783 'demo_url' => 'https://wpeasyelements.com/marquee/',
784 'docx_url' => 'https://wpeasyelements.com/docs/marquee/',
785 'is_pro' => true,
786 'tab' => 'widget',
787 ],
788 'button' => [
789 'icon' => 'easyelIcon-button',
790 'title' => 'Button',
791 'description' => 'Button.',
792 'demo_url' => 'https://wpeasyelements.com/button/',
793 'docx_url' => 'https://wpeasyelements.com/docs/button',
794 'is_pro' => false,
795 'tab' => 'widget',
796 ],
797 'social_share' => [
798 'icon' => 'easyelIcon-social-share',
799 'title' => 'Social Share',
800 'description' => 'Social Share.',
801 'demo_url' => 'https://wpeasyelements.com/',
802 'docx_url' => 'https://wpeasyelements.com/docs/',
803 'is_pro' => false,
804 'tab' => 'widget',
805 ],
806 'social_icon' => [
807 'icon' => 'easyelIcon-social-icons',
808 'title' => 'Social Icon',
809 'description' => 'Social Icon.',
810 'demo_url' => 'https://wpeasyelements.com/social-icon',
811 'docx_url' => 'https://wpeasyelements.com/docs/social-icon',
812 'is_pro' => false,
813 'tab' => 'widget',
814 ],
815 'breadcrumb' => [
816 'icon' => 'easyelIcon-breadcumb',
817 'title' => 'Breadcrumb',
818 'description' => 'Breadcrumb.',
819 'demo_url' => 'https://wpeasyelements.com/breadcrumb',
820 'docx_url' => 'https://wpeasyelements.com/docs/breadcrumb',
821 'is_pro' => false,
822 'tab' => 'widget',
823 ],
824 'easy_slider' => [
825 'icon' => 'easyelIcon-slider',
826 'title' => 'Slider',
827 'description' => 'Slider.',
828 'demo_url' => 'https://wpeasyelements.com/slider',
829 'docx_url' => 'https://wpeasyelements.com/docs/slider',
830 'is_pro' => true,
831 'tab' => 'widget',
832 ],
833 'image_accordion' => [
834 'icon' => 'easyelIcon-image-accordion',
835 'title' => 'Image Accordion',
836 'description' => 'Image Accordion',
837 'demo_url' => 'https://wpeasyelements.com/image-accordion/',
838 'docx_url' => 'https://wpeasyelements.com/docs/image-accordion/',
839 'is_pro' => true,
840 'tab' => 'widget',
841 ],
842 'domain_search' => [
843 'icon' => 'easyelIcon-domain-search',
844 'title' => 'Domain Search',
845 'description' => 'Domain Search.',
846 'demo_url' => 'https://wpeasyelements.com/',
847 'docx_url' => 'https://wpeasyelements.com/docs/',
848 'is_pro' => false,
849 'tab' => 'widget',
850 ],
851 'featured_project' => [
852 'icon' => 'easyelIcon-custom-projects',
853 'title' => 'Custom Projects',
854 'description' => 'Custom Projects.',
855 'demo_url' => 'https://wpeasyelements.com/',
856 'docx_url' => 'https://wpeasyelements.com/docs/',
857 'is_pro' => true,
858 'tab' => 'widget',
859 ],
860 'advance_button' => [
861 'icon' => 'easyelIcon-button',
862 'title' => 'Advance Button',
863 'description' => 'Advance Button.',
864 'demo_url' => 'https://wpeasyelements.com/advance-button/',
865 'docx_url' => 'https://wpeasyelements.com/docs/advance-button',
866 'is_pro' => true,
867 'tab' => 'widget',
868 ],
869 'hr_image_scroll' => [
870 'icon' => 'easyelIcon-image-horizontal-scroll',
871 'title' => 'Horizontal Scroll',
872 'description' => 'Horizontal Scroll.',
873 'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/',
874 'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/',
875 'is_pro' => true,
876 'tab' => 'widget',
877 ],
878 'scrolltrigger_title' => [
879 'icon' => 'easyelIcon-title-scrolltrigger',
880 'title' => 'Content ScrollTrigger',
881 'description' => 'Content ScrollTrigger.',
882 'demo_url' => 'https://wpeasyelements.com/title-scrolltrigger/',
883 'docx_url' => 'https://wpeasyelements.com/docs/title-scrolltrigger/',
884 'is_pro' => true,
885 'tab' => 'widget',
886 ],
887 'Flip_Box' => [
888 'icon' => 'easyelIcon-flip-box',
889 'title' => 'Flip Box',
890 'description' => 'Flip Box.',
891 'demo_url' => 'https://wpeasyelements.com/flip-box',
892 'docx_url' => 'https://wpeasyelements.com/docs/flip-box',
893 'is_pro' => true,
894 'group' => 'Creative Widgets',
895 'tab' => 'widget',
896 ],
897 'easy_offcanvas' => [
898 'icon' => 'easyelIcon-canvas',
899 'title' => 'Offcanvas',
900 'description' => 'Offcanvas.',
901 'demo_url' => 'https://wpeasyelements.com/offcanvas',
902 'docx_url' => 'https://wpeasyelements.com/docs/offcanvas',
903 'is_pro' => false,
904 'group' => 'Header & Footer Widget',
905 'tab' => 'widget',
906 ],
907 'site_logo' => [
908 'icon' => 'easyelIcon-site-logo',
909 'title' => 'Site Logo',
910 'description' => 'Display your website logo easily with this widget.',
911 'demo_url' => 'https://wpeasyelements.com/site-logo/',
912 'docx_url' => 'https://wpeasyelements.com/docs/site-logo/',
913 'is_pro' => false,
914 'group' => 'Header & Footer Widget',
915 'tab' => 'widget',
916 ],
917 'search' => [
918 'icon' => 'easyelIcon-search',
919 'title' => 'Simple Search',
920 'description' => 'Search All Content.',
921 'demo_url' => 'https://wpeasyelements.com/search',
922 'docx_url' => 'https://wpeasyelements.com/docs/search',
923 'is_pro' => false,
924 'group' => 'Header & Footer Widget',
925 'tab' => 'widget',
926 ],
927 'navigation_menu' => [
928 'icon' => 'easyelIcon-navigation',
929 'title' => 'Navigation Menu',
930 'description' => 'Navigation Menu.',
931 'demo_url' => 'https://wpeasyelements.com/',
932 'docx_url' => 'https://wpeasyelements.com/docs/',
933 'is_pro' => false,
934 'group' => 'Header & Footer Widget',
935 'tab' => 'widget',
936 ],
937 'page_title' => [
938 'icon' => 'easyelIcon-page-title',
939 'title' => 'Page Title',
940 'description' => 'Page Title.',
941 'demo_url' => 'https://wpeasyelements.com/',
942 'docx_url' => 'https://wpeasyelements.com/docs/',
943 'is_pro' => false,
944 'group' => 'Header & Footer Widget',
945 'tab' => 'widget',
946 ],
947 'post_tags' => [
948 'icon' => 'easyelIcon-post-tag',
949 'title' => 'Current Post Tags',
950 'description' => 'Current Post Tags.',
951 'demo_url' => 'https://wpeasyelements.com/',
952 'docx_url' => 'https://wpeasyelements.com/docs/',
953 'is_pro' => false,
954 'group' => 'Theme Builder Widget',
955 'tab' => 'widget',
956 ],
957 'post_author' => [
958 'icon' => 'easyelIcon-author',
959 'title' => 'Post Author Info',
960 'description' => 'Post Author Info.',
961 'demo_url' => 'https://wpeasyelements.com/',
962 'docx_url' => 'https://wpeasyelements.com/docs/',
963 'is_pro' => false,
964 'group' => 'Theme Builder Widget',
965 'tab' => 'widget',
966 ],
967 'post_title' => [
968 'icon' => 'easyelIcon-post-title',
969 'title' => 'Post Title',
970 'description' => 'Post Title.',
971 'demo_url' => 'https://wpeasyelements.com/',
972 'docx_url' => 'https://wpeasyelements.com/docs/',
973 'is_pro' => false,
974 'group' => 'Theme Builder Widget',
975 'tab' => 'widget',
976 ],
977 'post_content' => [
978 'icon' => 'easyelIcon-post-content',
979 'title' => 'Post Content',
980 'description' => 'Post Content.',
981 'demo_url' => 'https://wpeasyelements.com/',
982 'docx_url' => 'https://wpeasyelements.com/docs/',
983 'is_pro' => false,
984 'group' => 'Theme Builder Widget',
985 'tab' => 'widget',
986 ],
987 'excerpt' => [
988 'icon' => 'easyelIcon-post-excerpt',
989 'title' => 'Post Excerpt',
990 'description' => 'Post Excerpt.',
991 'demo_url' => 'https://wpeasyelements.com/',
992 'docx_url' => 'https://wpeasyelements.com/docs/',
993 'is_pro' => false,
994 'group' => 'Theme Builder Widget',
995 'tab' => 'widget',
996 ],
997 'related_post' => [
998 'icon' => 'easyelIcon-related-post',
999 'title' => 'Related Post',
1000 'description' => 'Related Post.',
1001 'demo_url' => 'https://wpeasyelements.com/',
1002 'docx_url' => 'https://wpeasyelements.com/docs/',
1003 'is_pro' => true,
1004 'group' => 'Theme Builder Widget',
1005 'tab' => 'widget',
1006 ],
1007 'post_pagination' => [
1008 'icon' => 'easyelIcon-pagination',
1009 'title' => 'Post Pagination',
1010 'description' => 'Post Pagination.',
1011 'demo_url' => 'https://wpeasyelements.com/',
1012 'docx_url' => 'https://wpeasyelements.com/docs/',
1013 'is_pro' => false,
1014 'group' => 'Theme Builder Widget',
1015 'tab' => 'widget',
1016 ],
1017 'post_meta' => [
1018 'icon' => 'easyelIcon-meta',
1019 'title' => 'Post Meta',
1020 'description' => 'Post Meta.',
1021 'demo_url' => 'https://wpeasyelements.com/',
1022 'docx_url' => 'https://wpeasyelements.com/docs/',
1023 'is_pro' => false,
1024 'group' => 'Theme Builder Widget',
1025 'tab' => 'widget',
1026 ],
1027 'post_comments' => [
1028 'icon' => 'easyelIcon-comments',
1029 'title' => 'Post Comments',
1030 'description' => 'Post Comments.',
1031 'demo_url' => 'https://wpeasyelements.com/',
1032 'docx_url' => 'https://wpeasyelements.com/docs/',
1033 'is_pro' => false,
1034 'group' => 'Theme Builder Widget',
1035 'tab' => 'widget',
1036 ],
1037 'featured_image' => [
1038 'icon' => 'easyelIcon-image-carousel',
1039 'title' => 'Featured Image',
1040 'description' => 'Featured Image.',
1041 'demo_url' => 'https://wpeasyelements.com/',
1042 'docx_url' => 'https://wpeasyelements.com/docs/',
1043 'is_pro' => false,
1044 'group' => 'Theme Builder Widget',
1045 'tab' => 'widget',
1046 ],
1047 'easy_scroll_to_top' => [
1048 'icon' => 'easyelIcon-scroll-top',
1049 'title' => 'Scroll Top',
1050 'description' => 'Scroll Top.',
1051 'demo_url' => 'https://wpeasyelements.com/docs/scroll-to-top/',
1052 'docx_url' => 'https://wpeasyelements.com/docs/scroll-to-top/',
1053 'is_pro' => false,
1054 'group' => 'Theme Builder Widget',
1055 'tab' => 'widget',
1056 ],
1057 'easy_table' => [
1058 'icon' => 'easyelIcon-clients-logo-grid',
1059 'title' => 'Table',
1060 'description' => 'Table.',
1061 'demo_url' => 'https://wpeasyelements.com/table',
1062 'docx_url' => 'https://wpeasyelements.com/docs/table',
1063 'is_pro' => false,
1064 'tab' => 'widget',
1065 ],
1066 'advance_image' => [
1067 'icon' => 'easyelIcon-image-carousel',
1068 'title' => 'Advance Image',
1069 'description' => 'Advance Image Here.',
1070 'demo_url' => 'https://wpeasyelements.com/advance-image/',
1071 'docx_url' => 'https://wpeasyelements.com/docs/advance-image/',
1072 'is_pro' => true,
1073 'group' => 'Animations',
1074 'tab' => 'widget',
1075 ],
1076 'bmi_calculator' => [
1077 'icon' => 'easyelIcon-calculator',
1078 'title' => 'BMI Calculator',
1079 'description' => 'BMI Calculator.',
1080 'demo_url' => 'https://wpeasyelements.com/bmi-calculator/',
1081 'docx_url' => 'https://wpeasyelements.com/docs/bmi-calculator/',
1082 'is_pro' => true,
1083 'group' => 'Creative Widgets',
1084 'tab' => 'widget',
1085 ],
1086 'typewriter' => [
1087 'icon' => 'easyelIcon-heading',
1088 'title' => 'Typewriter',
1089 'description' => 'Animated typewriter text effect.',
1090 'demo_url' => 'https://wpeasyelements.com/',
1091 'docx_url' => 'https://wpeasyelements.com/docs/',
1092 'is_pro' => true,
1093 'group' => 'Animations',
1094 'tab' => 'widget',
1095 ],
1096 'animated_title' => [
1097 'icon' => 'easyelIcon-animated-title',
1098 'title' => 'Animated Title',
1099 'description' => 'Animated title text effect.',
1100 'demo_url' => 'https://wpeasyelements.com/animated-title/',
1101 'docx_url' => 'https://wpeasyelements.com/docs/',
1102 'is_pro' => true,
1103 'group' => 'Animations',
1104 'tab' => 'widget',
1105 ],
1106 'easytext_animation' => [
1107 'icon' => 'easyelIcon-heading',
1108 'title' => 'Animated Text',
1109 'description' => 'Animated text animation effect.',
1110 'demo_url' => 'https://wpeasyelements.com/',
1111 'docx_url' => 'https://wpeasyelements.com/docs/',
1112 'is_pro' => true,
1113 'group' => 'Animations',
1114 'tab' => 'widget',
1115 ],
1116 'easy_feature' => [
1117 'icon' => 'easyelIcon-marquee-logo',
1118 'title' => 'Hover Image Box',
1119 'description' => 'Hover image box content.',
1120 'demo_url' => 'https://wpeasyelements.com/hover-image-box/',
1121 'docx_url' => 'https://wpeasyelements.com/docs/hover-image-box/',
1122 'is_pro' => true,
1123 'tab' => 'widget',
1124 ],
1125 'easy_gallery' => [
1126 'icon' => 'easyelIcon-marquee-logo',
1127 'title' => 'Simple Gallery',
1128 'description' => 'Gallery',
1129 'demo_url' => 'https://wpeasyelements.com/simple-gallery/',
1130 'docx_url' => 'https://wpeasyelements.com/docs/simple-gallery/',
1131 'is_pro' => false,
1132 'tab' => 'widget',
1133 ],
1134 'image_gallery_filter' => [
1135 'icon' => 'easyelIcon-filterable-gallery',
1136 'title' => 'Filterable Gallery',
1137 'description' => 'filterable Gallery',
1138 'demo_url' => 'https://wpeasyelements.com/gallery-filter/',
1139 'docx_url' => 'https://wpeasyelements.com/gallery-filter/',
1140 'is_pro' => true,
1141 'group' => 'Creative Widgets',
1142 'tab' => 'widget',
1143 ],
1144 'portfolio_pro' => [
1145 'icon' => 'easyelIcon-marquee-logo',
1146 'title' => 'Portfolio',
1147 'description' => 'Portfolio',
1148 'demo_url' => 'https://wpeasyelements.com/portfolio/',
1149 'docx_url' => 'https://wpeasyelements.com/docs/portfolio/',
1150 'is_pro' => true,
1151 'tab' => 'widget',
1152 ],
1153 'portfolio_filter' => [
1154 'icon' => 'easyelIcon-marquee-logo',
1155 'title' => 'Portfolio Filter',
1156 'description' => 'Portfolio filter',
1157 'demo_url' => 'https://wpeasyelements.com/portfolio-filter/',
1158 'docx_url' => 'https://wpeasyelements.com/docs/portfolio-filter/',
1159 'is_pro' => true,
1160 'tab' => 'widget',
1161 ],
1162 'protected_content' => [
1163 'icon' => 'easyelIcon-protected-content',
1164 'title' => 'Protected Content',
1165 'description' => 'This Widget is protected content',
1166 'demo_url' => 'https://wpeasyelements.com/protected-contents/',
1167 'docx_url' => 'https://wpeasyelements.com/docs/protected-contents/',
1168 'is_pro' => true,
1169 'group' => 'Creative Widgets',
1170 'tab' => 'widget',
1171 ],
1172 'advanced_search' => [
1173 'icon' => 'easyelIcon-advance-search',
1174 'title' => 'Advanced Search',
1175 'description' => 'This Widget is advanced search',
1176 'demo_url' => 'https://wpeasyelements.com/advanced-search/',
1177 'docx_url' => 'https://wpeasyelements.com/docs/advanced-search/',
1178 'is_pro' => true,
1179 'tab' => 'widget',
1180 ],
1181 'enable_image_hover_effect' => [
1182 'icon' => 'easyelIcon-marquee-logo',
1183 'title' => 'Image Hover Effect',
1184 'description' => 'This Widget is image hover effect',
1185 'demo_url' => 'https://wpeasyelements.com/image-hover-effect/',
1186 'docx_url' => 'https://wpeasyelements.com/docs/image-hover-effect/',
1187 'is_pro' => true,
1188 'group' => 'Creative Widgets',
1189 'tab' => 'widget',
1190 ],
1191 'image_hotspot' => [
1192 'icon' => 'easyelIcon-marquee-logo',
1193 'title' => 'image Hotspot',
1194 'description' => 'This Widget is Image Hotspot',
1195 'demo_url' => 'https://wpeasyelements.com/image-hotspot/',
1196 'docx_url' => 'https://wpeasyelements.com/docs/image-hotspot/',
1197 'is_pro' => true,
1198 'group' => 'Creative Widgets',
1199 'tab' => 'widget',
1200 ],
1201 'hr_image_scroll' => [
1202 'icon' => 'easyelIcon-image-horizontal-scroll',
1203 'title' => 'ScrollTrigger',
1204 'description' => 'This Widget is image hover effect',
1205 'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/',
1206 'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/',
1207 'is_pro' => true,
1208 'group' => 'Animations',
1209 'tab' => 'widget',
1210 ],
1211 'archive_post' => [
1212 'icon' => 'easyelIcon-post-grid',
1213 'title' => 'Archive Post',
1214 'description' => 'This Widget is archive post widget',
1215 'demo_url' => 'https://wpeasyelements.com/post-grid/',
1216 'docx_url' => 'https://wpeasyelements.com/docs/post-grid/',
1217 'is_pro' => false,
1218 'tab' => 'widget',
1219 ],
1220 'counter' => [
1221 'icon' => 'easyelIcon-counter',
1222 'title' => 'Counter',
1223 'description' => 'This is a widget that counts up.',
1224 'demo_url' => 'https://wpeasyelements.com/counter/',
1225 'docx_url' => 'https://wpeasyelements.com/docs/counter/',
1226 'is_pro' => false,
1227 'group' => 'Creative Widgets',
1228 'tab' => 'widget',
1229 ],
1230 'countdown' => [
1231 'icon' => 'easyelIcon-countdown',
1232 'title' => 'Countdown',
1233 'description' => 'This is a countdown widget.',
1234 'demo_url' => 'https://wpeasyelements.com/countdown/',
1235 'docx_url' => 'https://wpeasyelements.com/docs/countdown/',
1236 'is_pro' => false,
1237 'group' => 'Creative Widgets',
1238 'tab' => 'widget',
1239 ],
1240 'easy_progress' => [
1241 'icon' => 'easyelIcon-progress-bar',
1242 'title' => 'Progress Bar',
1243 'description' => 'This is a Progress bar widget.',
1244 'demo_url' => 'https://wpeasyelements.com/progressbar/',
1245 'docx_url' => 'https://wpeasyelements.com/docs/progressbar/',
1246 'is_pro' => false,
1247 'group' => 'Creative Widgets',
1248 'tab' => 'widget',
1249 ],
1250 'facebook_feed' => [
1251 'icon' => 'easyelIcon-facebook-feed',
1252 'title' => 'Facebook Feed',
1253 'description' => 'This Widget is facebook feeds',
1254 'demo_url' => 'https://wpeasyelements.com/facebook-feed/',
1255 'docx_url' => 'https://wpeasyelements.com/docs/facebook-feed/',
1256 'is_pro' => true,
1257 'group' => 'Social Media Feeds',
1258 'tab' => 'widget',
1259 ],
1260 'instagram_feed' => [
1261 'icon' => 'easyelIcon-instagram-feed',
1262 'title' => 'Instagram Feed',
1263 'description' => 'This Widget is instagram feeds',
1264 'demo_url' => 'https://wpeasyelements.com/instagram-feed/',
1265 'docx_url' => 'https://wpeasyelements.com/docs/instagram-feed/',
1266 'is_pro' => true,
1267 'group' => 'Social Media Feeds',
1268 'tab' => 'widget',
1269 ],
1270 'login_register' => [
1271 'icon' => 'easyelIcon-login',
1272 'title' => 'Login / Register',
1273 'description' => 'This Widget is login and register form',
1274 'demo_url' => 'https://wpeasyelements.com/register/',
1275 'docx_url' => 'https://wpeasyelements.com/docs/login-register/',
1276 'is_pro' => false,
1277 'group' => 'Form Widgets',
1278 'tab' => 'widget',
1279 ],
1280 ];
1281 return apply_filters( 'easyel_available_widgets', $widgets );
1282 }
1283
1284 /**
1285 * Admin page HTML
1286 */
1287 function easyel_custom_fonts_page_html() {
1288 if ( ! current_user_can( 'manage_options' ) ) return;
1289
1290 if ( ! defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) || ! EASY_ELEMENTS_PRO_ACTIVE ) { ?>
1291 <div class="easyel-custom-font-page">
1292 <div class="easyel-custom-font-banner">
1293 <div class="easyel-custom-font-banner-content">
1294 <h1><?php esc_html_e( 'Custom Fonts', 'easy-elements' ); ?></h1>
1295
1296 <p>
1297 <?php esc_html_e(
1298 'Upload and manage custom fonts.',
1299 'easy-elements'
1300 ); ?>
1301 </p>
1302 <p>Upload TTF, OTF, WOFF</p>
1303 <a
1304 href="https://wpeasyelements.com/pricing/"
1305 target="_blank"
1306 class="easyel-upgrade-btn-custom-font"
1307 >
1308 <?php esc_html_e( 'Upgrade to Pro', 'easy-elements' ); ?>
1309 </a>
1310 </div>
1311 </div>
1312 </div>
1313 <?php
1314 return;
1315 }
1316
1317 $pro_version = easyel_get_pro_clean_version();
1318
1319 if (
1320 $pro_version &&
1321 version_compare( $pro_version, '1.0.8', '>=' )
1322 ) {
1323 if (
1324 did_action( 'plugins_loaded' ) &&
1325 class_exists( '\EasyElements_Elementor\Pro\CustomFont\FontUploader' ) ) {
1326 $manager = \EasyElements_Elementor\Pro\CustomFont\FontUploader::get_instance();
1327
1328 if ( method_exists( $manager, 'easyel_pro_custom_fonts_page' ) ) {
1329 $manager->easyel_pro_custom_fonts_page();
1330 }
1331 }
1332 } else {
1333 easyel_pro_custom_fonts_page();
1334 }
1335
1336 }
1337
1338 /**
1339 * Hide admin notices on the Easy Elements dashboard page.
1340 */
1341 function easyel_hide_admin_notices() {
1342 $screen = get_current_screen();
1343
1344 if ( $screen && 'toplevel_page_easy-elements-dashboard' === $screen->id ) {
1345
1346 $custom_css = '
1347 /* Hide all common notices */
1348 .notice,
1349 .updated,
1350 .error,
1351 .update-nag,
1352 .notice-success,
1353 .notice-error,
1354 .notice-warning {
1355 display: none !important;
1356 }
1357
1358 /* But allow EasyEL notice */
1359 .easyel-promo-notice {
1360 display: block !important;
1361 }
1362 ';
1363
1364 $handle = 'easyel-admin-hide-notices';
1365 wp_register_style( $handle, false, [], EASYELEMENTS_VER );
1366 wp_enqueue_style( $handle );
1367 wp_add_inline_style( $handle, $custom_css );
1368 }
1369 }
1370
1371 public function easyel_smooth_scroller_popup_display() {
1372
1373 $options = get_option('easyel_scroll_smoother_settings', []);
1374
1375 ?>
1376 <div class="easyel-smooth-scroll-popup">
1377 <div class="ajax-search-close-icon">
1378 <a class="easyel-smooth-scroll-popup-close-icon rbt-round-btn" href="#">
1379 <svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
1380 <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>
1381 </svg>
1382 </a>
1383 </div>
1384
1385 <div class="wrapper">
1386 <h2 class="easyel-smooth-scroll-heading"><?php echo esc_html__("Smooth Scroll Settings","easy-elements"); ?></h2>
1387 <form method="post" action="">
1388 <div class="easyel-smooth-scroll-settings-main-wrapper">
1389
1390 <!-- Smooth Speed -->
1391 <div class="easyel-smooth-scroll-item">
1392 <span class="easy-field-label"><?php echo esc_html__("Speed (2.0–5):","easy-elements"); ?></span>
1393 <label class="easy-field-item">
1394 <input type="number"
1395 name="smooth_scroll_speed"
1396 min="0.1" max="5" step="0.1"
1397 value="<?php echo isset($options['smooth_scroll_speed']) ? esc_attr($options['smooth_scroll_speed']) : '2.0'; ?>">
1398 </label>
1399 </div>
1400
1401 <!-- Normalize Scroll -->
1402 <div class="easyel-smooth-scroll-item">
1403 <span class="easy-field-label"><?php echo esc_html__("Normalize Scroll","easy-elements"); ?></span>
1404 <label class="easy-field-item easy-toggle-switch">
1405 <input type="checkbox"
1406 name="smooth_scroll_normalize"
1407 value="1"
1408 <?php checked( isset($options['smooth_scroll_normalize']) ? $options['smooth_scroll_normalize'] : 1, 1 ); ?>>
1409 <span class="slider round"></span>
1410 </label>
1411 </div>
1412
1413 <!-- Enable on Mobile -->
1414 <div class="easyel-smooth-scroll-item">
1415 <span class="easy-field-label"><?php echo esc_html__("Enable on Mobile Devices","easy-elements"); ?></span>
1416 <label class="easy-field-item easy-toggle-switch">
1417 <input type="checkbox"
1418 name="smooth_scroll_enable_mobile"
1419 value="1"
1420 <?php checked( isset($options['smooth_scroll_enable_mobile']) ? $options['smooth_scroll_enable_mobile'] : 0, 1 ); ?>>
1421 <span class="slider round"></span>
1422 </label>
1423 </div>
1424
1425 <!-- Disable on Editor Mode -->
1426 <div class="easyel-smooth-scroll-item">
1427 <span class="easy-field-label"><?php echo esc_html__("Disable on Editor Mode","easy-elements"); ?></span>
1428 <label class="easy-field-item easy-toggle-switch">
1429 <input type="checkbox"
1430 name="smooth_scroll_disable_editor_mode"
1431 value="1"
1432 <?php checked( isset($options['smooth_scroll_disable_editor_mode']) ? $options['smooth_scroll_disable_editor_mode'] : 0, 1 ); ?>>
1433 <span class="slider round"></span>
1434 </label>
1435 </div>
1436
1437 </div>
1438
1439 <div class="easyel-smooth-scroll-save">
1440 <input type="submit"
1441 class="smooth_scroll_popup_item_save"
1442 name="smooth_scroll_popup_item_save"
1443 value="<?php echo esc_attr__('Save Changes', 'easy-elements'); ?>">
1444 </div>
1445 </form>
1446 </div>
1447
1448 </div>
1449 <?php
1450 }
1451
1452 public function easyel_smooth_scroller_popup_callback() {
1453 $this->easyel_smooth_scroller_popup_display();
1454 }
1455
1456 function save_smooth_scroll_settings() {
1457
1458 // Permission check
1459 if ( ! current_user_can('manage_options') ) {
1460 wp_send_json_error(__('Unauthorized', 'easy-elements'));
1461 }
1462
1463 // Nonce check
1464 check_ajax_referer('easy_elements_nonce', 'nonce');
1465
1466 if ( ! isset($_POST['settings']) ) {
1467 wp_send_json_error(['message' => 'No settings received']);
1468 }
1469
1470 // Sanitize deeply
1471 $settings = map_deep( wp_unslash( $_POST['settings'] ), 'sanitize_text_field');
1472
1473 // Save all settings under one option name
1474 update_option('easyel_scroll_smoother_settings', $settings);
1475
1476 wp_send_json_success(['message' => 'Saved successfully']);
1477 }
1478
1479 }
1480
1481 // Initialize the plugin
1482 Admin_Settings::get_instance();