PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.6.4
Spider Elements – Premium Elementor Widgets & Addons Library v1.6.4
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / includes / Admin / dashboard / features.php
spider-elements / includes / Admin / dashboard Last commit date
elements.php 1 year ago features.php 1 year ago integration.php 1 year ago popup-pro.php 1 year ago sidebar.php 1 year ago welcome.php 1 year ago
features.php
139 lines
1 <?php
2 if (!defined('ABSPATH')) {
3 exit; // Exit if accessed directly
4 }
5
6 use SPEL\includes\Admin\Module_Settings;
7 $features = Module_Settings::get_widget_settings();
8
9 // Global switcher
10 $opt = get_option('spel_features_settings');
11 $global_switcher = $opt['features_global_switcher'] ?? '';
12 $is_checked = !empty ($global_switcher == 'on') ? ' checked' : '';
13 $checked = !isset ($opt['features_global_switcher']) ? ' checked' : $is_checked;
14
15 // Get the current theme
16 $theme = wp_get_theme();
17 $theme = in_array($theme->get('Name'), ['jobi', 'Jobi', 'jobi-child', 'Jobi Child']);
18 ?>
19 <div id="features" class="tab-box">
20
21 <div class="elements_tab_menu">
22 <div class="tab_contents">
23 <div class="icon">
24 <i class="icon-feature_two"></i>
25 </div>
26 <div class="content">
27 <h3><?php esc_html_e('Features', 'spider-elements'); ?></h3>
28 </div>
29 </div>
30
31 <div class="menu_right_content">
32 <div class="plugin_active_switcher">
33 <label class="toggler" id="features_disabled"><?php esc_html_e('Disable All', 'spider-elements'); ?></label>
34 <div class="toggle">
35 <input type="checkbox" data-id="widget-list" id="features_switcher" name="features_global_switcher" class="check features_global_switcher">
36 <label class="b switch" for="features_switcher"></label>
37 </div>
38 <label class="toggler" id="features_enabled"><?php esc_html_e('Enabled All', 'spider-elements'); ?></label>
39 </div>
40 <button type="submit" name="features-submit" id="features-submit" class="dashboard_btn save_btn">
41 <?php esc_html_e('Save Changes', 'spider-elements'); ?>
42 </button>
43 </div>
44
45 </div>
46
47 <div class="elements_tab" id="elements_filter">
48 <div class="filter_data active" data-filter="*">
49 <i class="icon-star"></i>
50 <?php esc_html_e('All', 'spider-elements'); ?>
51 </div>
52 <div class="filter_data" data-filter=".free">
53 <i class="icon-gift"></i>
54 <?php esc_html_e('Free', 'spider-elements'); ?>
55 </div>
56 <div class="filter_data" data-filter=".pro">
57 <i class="icon-premium"></i>
58 <?php esc_html_e('Pro', 'spider-elements'); ?>
59 </div>
60 </div>
61
62 <div class="filter_content ezd-d-flex" id="features_gallery">
63 <?php
64 if (isset($features[ 'spider_elements_features' ]) && is_array($features[ 'spider_elements_features' ])) {
65 foreach ( $features[ 'spider_elements_features' ] as $item ) {
66
67 $feature_type = $item[ 'feature_type' ] ?? '';
68 $feature_name = $item['name'] ?? '';
69
70 // Default class and attributes for widgets
71 $is_pro_feature = $feature_type === 'pro' ? ' pro_popup' : '';
72 $is_pro_feature_enabled = $feature_type === 'pro' ? ' disabled' : '';
73
74 // Unlock specific features for Jobi theme users
75 if (in_array($item['name'], ['spel_badge', 'spel_heading_highlighted']) && $theme || spel_is_premium() ) {
76 $is_pro_feature = ''; // Remove pro_popup class
77 $is_pro_feature_enabled = ''; // Enable widget
78 }
79
80 // By default, all the switcher is checked
81 $opt_input = $opt[ $feature_name ] ?? '';
82 $is_checked = ! empty ( $opt_input == 'on' ) ? ' checked' : '';
83 $checked = ! isset ( $opt[ $feature_name ] ) ? ' checked' : $is_checked;
84 ?>
85 <div class="ezd-colum-space-4 <?php echo esc_attr($item['feature_type']) ?>">
86 <div class="element_box element_switch badge">
87 <div class="element_content">
88 <?php
89 if (!empty($item[ 'icon' ])) { ?>
90 <i class="<?php echo esc_attr($item[ 'icon' ]) ?>"></i>
91 <?php
92 }
93 if (!empty($item[ 'label' ])) { ?>
94 <label for="elementor-video"><?php echo esc_html($item[ 'label' ]) ?></label>
95 <?php
96 }
97 ?>
98 </div>
99 <div class="element_right">
100 <?php
101 if (!empty($item[ 'label' ])) {
102 ?>
103 <div class="link">
104
105 <?php
106 if ( !empty($item['demo_url']) ) {
107 ?>
108 <a href="<?php echo esc_url($item[ 'demo_url' ]) ?>" class="tooltip-top" data-tooltip="<?php echo sprintf(esc_attr__('View %s Feature Demo', 'spider-elements'), $item[ 'label' ]) ?>" target="_blank">
109 <img src="<?php echo esc_url( SPEL_IMG . '/dashboard/icon-demo.svg') ?>" alt="<?php esc_attr_e('Widget Demo', 'spider-elements'); ?>">
110 </a>
111 <?php
112 }
113 if ( !empty($item['demo_url']) ) {
114 ?>
115 <a href="<?php echo esc_url($item[ 'video_url' ]) ?>" class="tooltip-top" data-tooltip="<?php echo sprintf(esc_attr__('View %s Video Tutorial', 'spider-elements'), $item[ 'label' ]) ?>" target="_blank">
116 <img src="<?php echo esc_url( SPEL_IMG . '/dashboard/icon-video.svg') ?>" alt="<?php esc_attr_e('Video Tutorial', 'spider-elements'); ?>">
117 </a>
118 <?php
119 }
120
121 ?>
122 </div>
123 <?php
124 }
125 ?>
126 <label for="<?php echo esc_attr($item['name']) ?>" class="switch_label<?php echo esc_attr($is_pro_feature) ?>">
127 <input type="checkbox" class="widget_checkbox widget-list" name="<?php echo esc_attr($item[ 'name' ]) ?>" id="<?php echo esc_attr($item[ 'name' ]) ?>" <?php echo esc_attr($checked . $is_pro_feature_enabled); ?>>
128 <span class="widget_switcher"></span>
129 </label>
130 </div>
131 </div>
132 </div>
133 <?php
134 }
135 }
136 ?>
137 </div>
138
139 </div>