PluginProbe
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder / 51.1.78
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder v51.1.78
51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 51.1.46 51.1.47 51.1.49 All 37 releases
king-addons / includes / extensions / Fomo_Notifications / templates / admin-settings.php

admin-settings.php in King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder 51.1.78, at includes/extensions/Fomo_Notifications/templates/admin-settings.php

372 lines 27.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Fomo Notifications - Settings Template
4 *
5 * @package King_Addons
6 */
7
8 defined('ABSPATH') || exit;
9
10 $is_pro = king_addons_freemius()->can_use_premium_code();
11 $settings = get_option('kng_fomo_settings', []);
12
13 // Default settings
14 $defaults = [
15 'enabled' => true,
16 'tracking_enabled' => true,
17 'track_for' => 'everyone',
18 'exclude_bots' => true,
19 'cache_ttl' => 300,
20 'anonymize_names' => false,
21 'sound_volume' => 50,
22 'modules' => [
23 'notification_bar' => true,
24 'woocommerce_sales' => true,
25 'wordpress_comments' => true,
26 'wporg_downloads' => true,
27 'reviews' => false,
28 'email_subscription' => false,
29 'donations' => false,
30 'flashing_tab' => false,
31 'custom_csv' => false,
32 ]
33 ];
34
35 $settings = wp_parse_args($settings, $defaults);
36 ?>
37
38 <div class="kng-fomo-admin">
39
40 <!-- Navigation -->
41 <nav class="kng-fomo-nav">
42 <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo')); ?>" class="kng-fomo-nav-item">
43 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9"></rect><rect x="14" y="3" width="7" height="5"></rect><rect x="14" y="12" width="7" height="9"></rect><rect x="3" y="16" width="7" height="5"></rect></svg>
44 <?php esc_html_e('Dashboard', 'king-addons'); ?>
45 </a>
46 <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=list')); ?>" class="kng-fomo-nav-item">
47 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>
48 <?php esc_html_e('Notifications', 'king-addons'); ?>
49 </a>
50 <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=wizard')); ?>" class="kng-fomo-nav-item">
51 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>
52 <?php esc_html_e('Add New', 'king-addons'); ?>
53 </a>
54 <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=analytics')); ?>" class="kng-fomo-nav-item">
55 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>
56 <?php esc_html_e('Analytics', 'king-addons'); ?>
57 </a>
58 <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=settings')); ?>" class="kng-fomo-nav-item is-active">
59 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
60 <?php esc_html_e('Settings', 'king-addons'); ?>
61 </a>
62 </nav>
63
64 <!-- Page Header -->
65 <div class="kng-fomo-section">
66 <div class="kng-fomo-section-header">
67 <div>
68 <h1 class="kng-fomo-section-title"><?php esc_html_e('Settings', 'king-addons'); ?></h1>
69 <p class="kng-fomo-section-subtitle"><?php esc_html_e('Configure global settings for Fomo Notifications', 'king-addons'); ?></p>
70 </div>
71 </div>
72 </div>
73
74 <form class="kng-fomo-settings-form">
75
76 <!-- Tabs -->
77 <div class="kng-fomo-tabs">
78 <button type="button" class="kng-fomo-tab is-active" data-tab="tab-general"><?php esc_html_e('General', 'king-addons'); ?></button>
79 <button type="button" class="kng-fomo-tab" data-tab="tab-modules"><?php esc_html_e('Modules', 'king-addons'); ?></button>
80 <button type="button" class="kng-fomo-tab" data-tab="tab-import-export"><?php esc_html_e('Import / Export', 'king-addons'); ?></button>
81 </div>
82
83 <!-- General Tab -->
84 <div id="tab-general" class="kng-fomo-tab-content is-active">
85 <div class="kng-fomo-card">
86 <div class="kng-fomo-field">
87 <label style="display: flex; align-items: center; gap: 12px;">
88 <label class="kng-fomo-toggle">
89 <input type="checkbox" name="enabled" <?php checked($settings['enabled']); ?>>
90 <span class="kng-fomo-toggle-slider"></span>
91 </label>
92 <div>
93 <span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Enable Fomo Notifications', 'king-addons'); ?></span>
94 <p class="kng-fomo-field-help" style="margin: 4px 0 0;"><?php esc_html_e('Master switch to enable or disable all notifications', 'king-addons'); ?></p>
95 </div>
96 </label>
97 </div>
98
99 <hr style="border: none; border-top: 1px solid var(--kng-fomo-border); margin: 24px 0;">
100
101 <div class="kng-fomo-field">
102 <label class="kng-fomo-label"><?php esc_html_e('Cache Duration', 'king-addons'); ?></label>
103 <select class="kng-fomo-select" name="cache_ttl">
104 <option value="0" <?php selected($settings['cache_ttl'], 0); ?>><?php esc_html_e('No Cache', 'king-addons'); ?></option>
105 <option value="60" <?php selected($settings['cache_ttl'], 60); ?>><?php esc_html_e('1 minute', 'king-addons'); ?></option>
106 <option value="300" <?php selected($settings['cache_ttl'], 300); ?>><?php esc_html_e('5 minutes', 'king-addons'); ?></option>
107 <option value="900" <?php selected($settings['cache_ttl'], 900); ?>><?php esc_html_e('15 minutes', 'king-addons'); ?></option>
108 <option value="3600" <?php selected($settings['cache_ttl'], 3600); ?>><?php esc_html_e('1 hour', 'king-addons'); ?></option>
109 </select>
110 <p class="kng-fomo-field-help"><?php esc_html_e('How long to cache notification data (improves performance)', 'king-addons'); ?></p>
111 </div>
112
113 <hr style="border: none; border-top: 1px solid var(--kng-fomo-border); margin: 24px 0;">
114
115 <div class="kng-fomo-field">
116 <label style="display: flex; align-items: center; gap: 12px;">
117 <label class="kng-fomo-toggle">
118 <input type="checkbox" name="tracking_enabled" <?php checked($settings['tracking_enabled']); ?>>
119 <span class="kng-fomo-toggle-slider"></span>
120 </label>
121 <div>
122 <span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Enable Analytics Tracking', 'king-addons'); ?></span>
123 <p class="kng-fomo-field-help" style="margin: 4px 0 0;"><?php esc_html_e('Track notification views and clicks', 'king-addons'); ?></p>
124 </div>
125 </label>
126 </div>
127
128 <div class="kng-fomo-field">
129 <label class="kng-fomo-label"><?php esc_html_e('Track For', 'king-addons'); ?></label>
130 <select class="kng-fomo-select" name="track_for">
131 <option value="everyone" <?php selected($settings['track_for'], 'everyone'); ?>><?php esc_html_e('Everyone', 'king-addons'); ?></option>
132 <option value="guests" <?php selected($settings['track_for'], 'guests'); ?>><?php esc_html_e('Guests Only', 'king-addons'); ?></option>
133 <option value="logged_in" <?php selected($settings['track_for'], 'logged_in'); ?>><?php esc_html_e('Logged In Users Only', 'king-addons'); ?></option>
134 </select>
135 <p class="kng-fomo-field-help"><?php esc_html_e('Which visitors to track analytics for', 'king-addons'); ?></p>
136 </div>
137
138 <div class="kng-fomo-field">
139 <label style="display: flex; align-items: center; gap: 12px;">
140 <input type="checkbox" name="exclude_bots" <?php checked($settings['exclude_bots']); ?>>
141 <div>
142 <span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Exclude Bots', 'king-addons'); ?></span>
143 <p class="kng-fomo-field-help" style="margin: 4px 0 0;"><?php esc_html_e('Do not count bot traffic in analytics', 'king-addons'); ?></p>
144 </div>
145 </label>
146 </div>
147
148 <hr style="border: none; border-top: 1px solid var(--kng-fomo-border); margin: 24px 0;">
149
150 <div class="kng-fomo-field">
151 <label style="display: flex; align-items: center; gap: 12px;">
152 <input type="checkbox" name="anonymize_names" <?php checked($settings['anonymize_names']); ?>>
153 <div>
154 <span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Anonymize Names', 'king-addons'); ?></span>
155 <p class="kng-fomo-field-help" style="margin: 4px 0 0;"><?php esc_html_e('Show partial names for privacy (e.g., "John D." instead of "John Doe")', 'king-addons'); ?></p>
156 </div>
157 </label>
158 </div>
159
160 <div class="kng-fomo-field">
161 <label class="kng-fomo-label"><?php esc_html_e('Sound Volume', 'king-addons'); ?></label>
162 <input type="range" class="kng-fomo-input" name="sound_volume" min="0" max="100" value="<?php echo esc_attr($settings['sound_volume']); ?>">
163 <p class="kng-fomo-field-help"><?php esc_html_e('Volume level for notification sounds (when enabled)', 'king-addons'); ?></p>
164 </div>
165 </div>
166 </div>
167
168 <!-- Modules Tab -->
169 <div id="tab-modules" class="kng-fomo-tab-content">
170 <div class="kng-fomo-card">
171 <p style="color: var(--kng-fomo-text-secondary); margin: 0 0 24px;"><?php esc_html_e('Enable or disable notification types globally', 'king-addons'); ?></p>
172
173 <div class="kng-fomo-modules">
174 <!-- Free Modules -->
175 <div class="kng-fomo-module">
176 <div class="kng-fomo-module-info">
177 <div class="kng-fomo-module-icon">
178 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line></svg>
179 </div>
180 <span class="kng-fomo-module-name"><?php esc_html_e('Notification Bar', 'king-addons'); ?></span>
181 </div>
182 <label class="kng-fomo-toggle">
183 <input type="checkbox" class="kng-fomo-module-toggle" data-module="notification_bar" <?php checked($settings['modules']['notification_bar'] ?? true); ?>>
184 <span class="kng-fomo-toggle-slider"></span>
185 </label>
186 </div>
187
188 <div class="kng-fomo-module">
189 <div class="kng-fomo-module-info">
190 <div class="kng-fomo-module-icon">
191 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
192 </div>
193 <span class="kng-fomo-module-name"><?php esc_html_e('WooCommerce Sales', 'king-addons'); ?></span>
194 </div>
195 <label class="kng-fomo-toggle">
196 <input type="checkbox" class="kng-fomo-module-toggle" data-module="woocommerce_sales" <?php checked($settings['modules']['woocommerce_sales'] ?? true); ?>>
197 <span class="kng-fomo-toggle-slider"></span>
198 </label>
199 </div>
200
201 <div class="kng-fomo-module">
202 <div class="kng-fomo-module-info">
203 <div class="kng-fomo-module-icon">
204 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
205 </div>
206 <span class="kng-fomo-module-name"><?php esc_html_e('WordPress Comments', 'king-addons'); ?></span>
207 </div>
208 <label class="kng-fomo-toggle">
209 <input type="checkbox" class="kng-fomo-module-toggle" data-module="wordpress_comments" <?php checked($settings['modules']['wordpress_comments'] ?? true); ?>>
210 <span class="kng-fomo-toggle-slider"></span>
211 </label>
212 </div>
213
214 <div class="kng-fomo-module">
215 <div class="kng-fomo-module-info">
216 <div class="kng-fomo-module-icon">
217 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
218 </div>
219 <span class="kng-fomo-module-name"><?php esc_html_e('WordPress.org Downloads', 'king-addons'); ?></span>
220 </div>
221 <label class="kng-fomo-toggle">
222 <input type="checkbox" class="kng-fomo-module-toggle" data-module="wporg_downloads" <?php checked($settings['modules']['wporg_downloads'] ?? true); ?>>
223 <span class="kng-fomo-toggle-slider"></span>
224 </label>
225 </div>
226
227 <!-- Pro Modules -->
228 <div class="kng-fomo-module <?php echo !$is_pro ? 'kng-fomo-module--locked' : ''; ?>">
229 <div class="kng-fomo-module-info">
230 <div class="kng-fomo-module-icon">
231 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
232 </div>
233 <span class="kng-fomo-module-name">
234 <?php esc_html_e('Reviews', 'king-addons'); ?>
235 <?php if (!$is_pro): ?>
236 <span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span>
237 <?php endif; ?>
238 </span>
239 </div>
240 <label class="kng-fomo-toggle">
241 <input type="checkbox" class="kng-fomo-module-toggle" data-module="reviews" <?php checked($settings['modules']['reviews'] ?? true); ?> <?php echo !$is_pro ? 'disabled' : ''; ?>>
242 <span class="kng-fomo-toggle-slider"></span>
243 </label>
244 </div>
245
246 <div class="kng-fomo-module <?php echo !$is_pro ? 'kng-fomo-module--locked' : ''; ?>">
247 <div class="kng-fomo-module-info">
248 <div class="kng-fomo-module-icon">
249 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
250 </div>
251 <span class="kng-fomo-module-name">
252 <?php esc_html_e('Email Subscriptions', 'king-addons'); ?>
253 <?php if (!$is_pro): ?>
254 <span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span>
255 <?php endif; ?>
256 </span>
257 </div>
258 <label class="kng-fomo-toggle">
259 <input type="checkbox" class="kng-fomo-module-toggle" data-module="email_subscription" <?php checked($settings['modules']['email_subscription'] ?? true); ?> <?php echo !$is_pro ? 'disabled' : ''; ?>>
260 <span class="kng-fomo-toggle-slider"></span>
261 </label>
262 </div>
263
264 <div class="kng-fomo-module <?php echo !$is_pro ? 'kng-fomo-module--locked' : ''; ?>">
265 <div class="kng-fomo-module-info">
266 <div class="kng-fomo-module-icon">
267 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
268 </div>
269 <span class="kng-fomo-module-name">
270 <?php esc_html_e('Donations', 'king-addons'); ?>
271 <?php if (!$is_pro): ?>
272 <span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span>
273 <?php endif; ?>
274 </span>
275 </div>
276 <label class="kng-fomo-toggle">
277 <input type="checkbox" class="kng-fomo-module-toggle" data-module="donations" <?php checked($settings['modules']['donations'] ?? true); ?> <?php echo !$is_pro ? 'disabled' : ''; ?>>
278 <span class="kng-fomo-toggle-slider"></span>
279 </label>
280 </div>
281
282 <div class="kng-fomo-module <?php echo !$is_pro ? 'kng-fomo-module--locked' : ''; ?>">
283 <div class="kng-fomo-module-info">
284 <div class="kng-fomo-module-icon">
285 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
286 </div>
287 <span class="kng-fomo-module-name">
288 <?php esc_html_e('Flashing Tab', 'king-addons'); ?>
289 <?php if (!$is_pro): ?>
290 <span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span>
291 <?php endif; ?>
292 </span>
293 </div>
294 <label class="kng-fomo-toggle">
295 <input type="checkbox" class="kng-fomo-module-toggle" data-module="flashing_tab" <?php checked($settings['modules']['flashing_tab'] ?? true); ?> <?php echo !$is_pro ? 'disabled' : ''; ?>>
296 <span class="kng-fomo-toggle-slider"></span>
297 </label>
298 </div>
299
300 <div class="kng-fomo-module <?php echo !$is_pro ? 'kng-fomo-module--locked' : ''; ?>">
301 <div class="kng-fomo-module-info">
302 <div class="kng-fomo-module-icon">
303 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line></svg>
304 </div>
305 <span class="kng-fomo-module-name">
306 <?php esc_html_e('Custom CSV', 'king-addons'); ?>
307 <?php if (!$is_pro): ?>
308 <span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span>
309 <?php endif; ?>
310 </span>
311 </div>
312 <label class="kng-fomo-toggle">
313 <input type="checkbox" class="kng-fomo-module-toggle" data-module="custom_csv" <?php checked($settings['modules']['custom_csv'] ?? true); ?> <?php echo !$is_pro ? 'disabled' : ''; ?>>
314 <span class="kng-fomo-toggle-slider"></span>
315 </label>
316 </div>
317 </div>
318 </div>
319 </div>
320
321 <!-- Import/Export Tab -->
322 <div id="tab-import-export" class="kng-fomo-tab-content">
323 <div class="kng-fomo-grid kng-fomo-grid--2">
324 <div class="kng-fomo-card">
325 <div class="kng-fomo-card-icon">
326 <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
327 </div>
328 <h3 class="kng-fomo-card-title"><?php esc_html_e('Export Notifications', 'king-addons'); ?></h3>
329 <p class="kng-fomo-card-desc"><?php esc_html_e('Download all notifications as JSON file for backup or migration.', 'king-addons'); ?></p>
330 <button type="button" class="kng-fomo-btn kng-fomo-btn--secondary kng-fomo-btn--sm kng-fomo-export" style="margin-top: 16px;">
331 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
332 <?php esc_html_e('Export', 'king-addons'); ?>
333 </button>
334 </div>
335
336 <div class="kng-fomo-card">
337 <div class="kng-fomo-card-icon">
338 <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
339 </div>
340 <h3 class="kng-fomo-card-title"><?php esc_html_e('Import Notifications', 'king-addons'); ?></h3>
341 <p class="kng-fomo-card-desc"><?php esc_html_e('Import notifications from a previously exported JSON file.', 'king-addons'); ?></p>
342 <button type="button" class="kng-fomo-btn kng-fomo-btn--secondary kng-fomo-btn--sm kng-fomo-import" style="margin-top: 16px;">
343 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
344 <?php esc_html_e('Import', 'king-addons'); ?>
345 </button>
346 </div>
347 </div>
348
349 <div class="kng-fomo-card" style="margin-top: 24px;">
350 <div class="kng-fomo-card-icon" style="background: var(--kng-fomo-danger-light); color: var(--kng-fomo-danger);">
351 <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>
352 </div>
353 <h3 class="kng-fomo-card-title"><?php esc_html_e('Clear Analytics Data', 'king-addons'); ?></h3>
354 <p class="kng-fomo-card-desc"><?php esc_html_e('Permanently delete all analytics data (views, clicks). This action cannot be undone.', 'king-addons'); ?></p>
355 <button type="button" class="kng-fomo-btn kng-fomo-btn--danger kng-fomo-btn--sm kng-fomo-purge-analytics" style="margin-top: 16px;">
356 <?php esc_html_e('Clear Analytics', 'king-addons'); ?>
357 </button>
358 </div>
359 </div>
360
361 <!-- Save Button -->
362 <div style="margin-top: 32px; display: flex; justify-content: flex-end;">
363 <button type="button" class="kng-fomo-btn kng-fomo-btn--primary kng-fomo-save-settings">
364 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
365 <?php esc_html_e('Save Settings', 'king-addons'); ?>
366 </button>
367 </div>
368
369 </form>
370
371 </div>
372