| 1 |
<?php |
| 2 |
/** |
| 3 |
* Fomo Notifications - Wizard Template (5-Step) |
| 4 |
* |
| 5 |
* @package King_Addons |
| 6 |
*/ |
| 7 |
|
| 8 |
defined('ABSPATH') || exit; |
| 9 |
|
| 10 |
$is_pro = king_addons_freemius()->can_use_premium_code(); |
| 11 |
$edit_id = isset($_GET['edit']) ? absint($_GET['edit']) : 0; |
| 12 |
|
| 13 |
// Notification types |
| 14 |
$notification_types = [ |
| 15 |
'notification_bar' => [ |
| 16 |
'label' => __('Notification Bar', 'king-addons'), |
| 17 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 18 |
'desc' => __('Sticky header/footer bar', 'king-addons'), |
| 19 |
'free' => true |
| 20 |
], |
| 21 |
'woocommerce_sales' => [ |
| 22 |
'label' => __('WooCommerce Sales', 'king-addons'), |
| 23 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 24 |
'desc' => __('Real-time sales popups', 'king-addons'), |
| 25 |
'free' => true |
| 26 |
], |
| 27 |
'wordpress_comments' => [ |
| 28 |
'label' => __('WordPress Comments', 'king-addons'), |
| 29 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 30 |
'desc' => __('Recent blog comments', 'king-addons'), |
| 31 |
'free' => true |
| 32 |
], |
| 33 |
'wporg_downloads' => [ |
| 34 |
'label' => __('WordPress.org Downloads', 'king-addons'), |
| 35 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 36 |
'desc' => __('Plugin/theme downloads', 'king-addons'), |
| 37 |
'free' => true |
| 38 |
], |
| 39 |
'reviews' => [ |
| 40 |
'label' => __('Reviews', 'king-addons'), |
| 41 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 42 |
'desc' => __('Product reviews', 'king-addons'), |
| 43 |
'free' => false |
| 44 |
], |
| 45 |
'email_subscription' => [ |
| 46 |
'label' => __('Email Subscriptions', 'king-addons'), |
| 47 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 48 |
'desc' => __('Newsletter signups', 'king-addons'), |
| 49 |
'free' => false |
| 50 |
], |
| 51 |
'donations' => [ |
| 52 |
'label' => __('Donations', 'king-addons'), |
| 53 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 54 |
'desc' => __('Recent donations', 'king-addons'), |
| 55 |
'free' => false |
| 56 |
], |
| 57 |
'flashing_tab' => [ |
| 58 |
'label' => __('Flashing Tab', 'king-addons'), |
| 59 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 60 |
'desc' => __('Browser tab attention', 'king-addons'), |
| 61 |
'free' => false |
| 62 |
], |
| 63 |
'custom_csv' => [ |
| 64 |
'label' => __('Custom CSV', 'king-addons'), |
| 65 |
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>', |
| 66 |
'desc' => __('Import from CSV', 'king-addons'), |
| 67 |
'free' => false |
| 68 |
] |
| 69 |
]; |
| 70 |
|
| 71 |
// Design templates |
| 72 |
$design_templates = [ |
| 73 |
'default' => [ |
| 74 |
'label' => __('Default', 'king-addons'), |
| 75 |
'preview' => 'default-preview.png' |
| 76 |
], |
| 77 |
'modern' => [ |
| 78 |
'label' => __('Modern', 'king-addons'), |
| 79 |
'preview' => 'modern-preview.png' |
| 80 |
], |
| 81 |
'minimal' => [ |
| 82 |
'label' => __('Minimal', 'king-addons'), |
| 83 |
'preview' => 'minimal-preview.png' |
| 84 |
], |
| 85 |
'rounded' => [ |
| 86 |
'label' => __('Rounded', 'king-addons'), |
| 87 |
'preview' => 'rounded-preview.png' |
| 88 |
] |
| 89 |
]; |
| 90 |
|
| 91 |
// Positions |
| 92 |
$positions = [ |
| 93 |
'bottom-left' => __('Bottom Left', 'king-addons'), |
| 94 |
'bottom-right' => __('Bottom Right', 'king-addons'), |
| 95 |
'top-left' => __('Top Left', 'king-addons'), |
| 96 |
'top-right' => __('Top Right', 'king-addons'), |
| 97 |
'bottom-center' => __('Bottom Center', 'king-addons'), |
| 98 |
'top-center' => __('Top Center', 'king-addons') |
| 99 |
]; |
| 100 |
|
| 101 |
// Animations |
| 102 |
$animations = [ |
| 103 |
'slide' => __('Slide', 'king-addons'), |
| 104 |
'fade' => __('Fade', 'king-addons'), |
| 105 |
'bounce' => __('Bounce', 'king-addons'), |
| 106 |
'scale' => __('Scale', 'king-addons') |
| 107 |
]; |
| 108 |
?> |
| 109 |
|
| 110 |
<div class="kng-fomo-admin"> |
| 111 |
|
| 112 |
<!-- Navigation --> |
| 113 |
<nav class="kng-fomo-nav"> |
| 114 |
<a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo')); ?>" class="kng-fomo-nav-item"> |
| 115 |
<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> |
| 116 |
<?php esc_html_e('Dashboard', 'king-addons'); ?> |
| 117 |
</a> |
| 118 |
<a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=list')); ?>" class="kng-fomo-nav-item"> |
| 119 |
<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> |
| 120 |
<?php esc_html_e('Notifications', 'king-addons'); ?> |
| 121 |
</a> |
| 122 |
<a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=wizard')); ?>" class="kng-fomo-nav-item is-active"> |
| 123 |
<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> |
| 124 |
<?php echo $edit_id ? esc_html__('Edit Notification', 'king-addons') : esc_html__('Add New', 'king-addons'); ?> |
| 125 |
</a> |
| 126 |
<a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=analytics')); ?>" class="kng-fomo-nav-item"> |
| 127 |
<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> |
| 128 |
<?php esc_html_e('Analytics', 'king-addons'); ?> |
| 129 |
</a> |
| 130 |
<a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-fomo&view=settings')); ?>" class="kng-fomo-nav-item"> |
| 131 |
<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> |
| 132 |
<?php esc_html_e('Settings', 'king-addons'); ?> |
| 133 |
</a> |
| 134 |
</nav> |
| 135 |
|
| 136 |
<!-- Wizard --> |
| 137 |
<div class="kng-fomo-wizard"> |
| 138 |
|
| 139 |
<!-- Header --> |
| 140 |
<div class="kng-fomo-wizard-header"> |
| 141 |
<h1 class="kng-fomo-wizard-title"> |
| 142 |
<?php echo $edit_id ? esc_html__('Edit Notification', 'king-addons') : esc_html__('Create Notification', 'king-addons'); ?> |
| 143 |
</h1> |
| 144 |
<p class="kng-fomo-wizard-subtitle"><?php esc_html_e('Follow the steps to configure your notification', 'king-addons'); ?></p> |
| 145 |
</div> |
| 146 |
|
| 147 |
<!-- Steps Indicator --> |
| 148 |
<div class="kng-fomo-wizard-steps"> |
| 149 |
<div class="kng-fomo-wizard-step is-active" data-step="1"> |
| 150 |
<span class="kng-fomo-wizard-step-num">1</span> |
| 151 |
<span><?php esc_html_e('Source', 'king-addons'); ?></span> |
| 152 |
</div> |
| 153 |
<div class="kng-fomo-wizard-step" data-step="2"> |
| 154 |
<span class="kng-fomo-wizard-step-num">2</span> |
| 155 |
<span><?php esc_html_e('Design', 'king-addons'); ?></span> |
| 156 |
</div> |
| 157 |
<div class="kng-fomo-wizard-step" data-step="3"> |
| 158 |
<span class="kng-fomo-wizard-step-num">3</span> |
| 159 |
<span><?php esc_html_e('Content', 'king-addons'); ?></span> |
| 160 |
</div> |
| 161 |
<div class="kng-fomo-wizard-step" data-step="4"> |
| 162 |
<span class="kng-fomo-wizard-step-num">4</span> |
| 163 |
<span><?php esc_html_e('Display', 'king-addons'); ?></span> |
| 164 |
</div> |
| 165 |
<div class="kng-fomo-wizard-step" data-step="5"> |
| 166 |
<span class="kng-fomo-wizard-step-num">5</span> |
| 167 |
<span><?php esc_html_e('Customize', 'king-addons'); ?></span> |
| 168 |
</div> |
| 169 |
</div> |
| 170 |
|
| 171 |
<!-- Step 1: Source --> |
| 172 |
<div class="kng-fomo-wizard-panel is-active" data-step="1"> |
| 173 |
<div class="kng-fomo-wizard-content"> |
| 174 |
<div class="kng-fomo-wizard-section"> |
| 175 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Notification Name', 'king-addons'); ?></h3> |
| 176 |
<div class="kng-fomo-field"> |
| 177 |
<input type="text" class="kng-fomo-input" id="kng-fomo-notif-name" data-field="name" placeholder="<?php esc_attr_e('e.g., Recent Sales Popup', 'king-addons'); ?>"> |
| 178 |
</div> |
| 179 |
</div> |
| 180 |
|
| 181 |
<div class="kng-fomo-wizard-section"> |
| 182 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Choose Notification Type', 'king-addons'); ?></h3> |
| 183 |
<div class="kng-fomo-radio-cards"> |
| 184 |
<?php foreach ($notification_types as $type_key => $type): |
| 185 |
$is_locked = !$type['free'] && !$is_pro; |
| 186 |
?> |
| 187 |
<label class="kng-fomo-radio-card <?php echo $is_locked ? 'kng-fomo-radio-card--locked' : ''; ?>"> |
| 188 |
<input type="radio" name="notification_type" value="<?php echo esc_attr($type_key); ?>" <?php echo $is_locked ? 'disabled' : ''; ?>> |
| 189 |
<div class="kng-fomo-radio-card-content"> |
| 190 |
<span class="kng-fomo-radio-card-icon"><?php echo $type['icon']; ?></span> |
| 191 |
<span class="kng-fomo-radio-card-label"><?php echo esc_html($type['label']); ?></span> |
| 192 |
</div> |
| 193 |
<?php if ($is_locked): ?> |
| 194 |
<span class="kng-fomo-card-badge kng-fomo-card-badge--pro"><?php esc_html_e('Pro', 'king-addons'); ?></span> |
| 195 |
<?php endif; ?> |
| 196 |
</label> |
| 197 |
<?php endforeach; ?> |
| 198 |
</div> |
| 199 |
</div> |
| 200 |
|
| 201 |
<!-- Source Config Panels (shown based on type) --> |
| 202 |
<div class="kng-fomo-source-config"> |
| 203 |
<!-- WooCommerce Config --> |
| 204 |
<div class="kng-fomo-source-config-panel" data-source="woocommerce_sales" style="display: none;"> |
| 205 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('WooCommerce Settings', 'king-addons'); ?></h3> |
| 206 |
<div class="kng-fomo-field-row"> |
| 207 |
<div class="kng-fomo-field"> |
| 208 |
<label class="kng-fomo-label"><?php esc_html_e('Order Status', 'king-addons'); ?></label> |
| 209 |
<select class="kng-fomo-select" data-field="order_status" data-section="source_config"> |
| 210 |
<option value="completed"><?php esc_html_e('Completed', 'king-addons'); ?></option> |
| 211 |
<option value="processing"><?php esc_html_e('Processing', 'king-addons'); ?></option> |
| 212 |
<option value="any"><?php esc_html_e('Any', 'king-addons'); ?></option> |
| 213 |
</select> |
| 214 |
</div> |
| 215 |
<div class="kng-fomo-field"> |
| 216 |
<label class="kng-fomo-label"><?php esc_html_e('Time Range', 'king-addons'); ?></label> |
| 217 |
<select class="kng-fomo-select" data-field="time_range" data-section="source_config"> |
| 218 |
<option value="24h"><?php esc_html_e('Last 24 hours', 'king-addons'); ?></option> |
| 219 |
<option value="7d"><?php esc_html_e('Last 7 days', 'king-addons'); ?></option> |
| 220 |
<option value="30d"><?php esc_html_e('Last 30 days', 'king-addons'); ?></option> |
| 221 |
</select> |
| 222 |
</div> |
| 223 |
</div> |
| 224 |
<div class="kng-fomo-field"> |
| 225 |
<label class="kng-fomo-label"><?php esc_html_e('Product Categories', 'king-addons'); ?> <span class="kng-fomo-label-hint"><?php esc_html_e('(optional)', 'king-addons'); ?></span></label> |
| 226 |
<select class="kng-fomo-select" data-field="categories" data-section="source_config" multiple> |
| 227 |
<?php |
| 228 |
$categories = get_terms(['taxonomy' => 'product_cat', 'hide_empty' => false]); |
| 229 |
if (!is_wp_error($categories)) { |
| 230 |
foreach ($categories as $cat) { |
| 231 |
echo '<option value="' . esc_attr($cat->term_id) . '">' . esc_html($cat->name) . '</option>'; |
| 232 |
} |
| 233 |
} |
| 234 |
?> |
| 235 |
</select> |
| 236 |
</div> |
| 237 |
</div> |
| 238 |
|
| 239 |
<!-- WordPress.org Config --> |
| 240 |
<div class="kng-fomo-source-config-panel" data-source="wporg_downloads" style="display: none;"> |
| 241 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('WordPress.org Settings', 'king-addons'); ?></h3> |
| 242 |
<div class="kng-fomo-field"> |
| 243 |
<label class="kng-fomo-label"><?php esc_html_e('Plugin/Theme Slug', 'king-addons'); ?></label> |
| 244 |
<input type="text" class="kng-fomo-input" data-field="wporg_slug" data-section="source_config" placeholder="<?php esc_attr_e('e.g., king-addons', 'king-addons'); ?>"> |
| 245 |
<p class="kng-fomo-field-help"><?php esc_html_e('Enter the slug from wordpress.org URL (e.g., wordpress.org/plugins/king-addons)', 'king-addons'); ?></p> |
| 246 |
</div> |
| 247 |
<div class="kng-fomo-field"> |
| 248 |
<label class="kng-fomo-label"><?php esc_html_e('Type', 'king-addons'); ?></label> |
| 249 |
<select class="kng-fomo-select" data-field="wporg_type" data-section="source_config"> |
| 250 |
<option value="plugin"><?php esc_html_e('Plugin', 'king-addons'); ?></option> |
| 251 |
<option value="theme"><?php esc_html_e('Theme', 'king-addons'); ?></option> |
| 252 |
</select> |
| 253 |
</div> |
| 254 |
</div> |
| 255 |
|
| 256 |
<!-- Comments Config --> |
| 257 |
<div class="kng-fomo-source-config-panel" data-source="wordpress_comments" style="display: none;"> |
| 258 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Comments Settings', 'king-addons'); ?></h3> |
| 259 |
<div class="kng-fomo-field"> |
| 260 |
<label class="kng-fomo-label"><?php esc_html_e('Post Types', 'king-addons'); ?></label> |
| 261 |
<select class="kng-fomo-select" data-field="post_types" data-section="source_config" multiple> |
| 262 |
<option value="post"><?php esc_html_e('Posts', 'king-addons'); ?></option> |
| 263 |
<option value="page"><?php esc_html_e('Pages', 'king-addons'); ?></option> |
| 264 |
<option value="product"><?php esc_html_e('Products', 'king-addons'); ?></option> |
| 265 |
</select> |
| 266 |
</div> |
| 267 |
<div class="kng-fomo-field"> |
| 268 |
<label class="kng-fomo-label"><?php esc_html_e('Number of Comments', 'king-addons'); ?></label> |
| 269 |
<input type="number" class="kng-fomo-input" data-field="comments_count" data-section="source_config" value="10" min="1" max="50"> |
| 270 |
</div> |
| 271 |
</div> |
| 272 |
</div> |
| 273 |
</div> |
| 274 |
</div> |
| 275 |
|
| 276 |
<!-- Step 2: Design --> |
| 277 |
<div class="kng-fomo-wizard-panel" data-step="2"> |
| 278 |
<div class="kng-fomo-wizard-content"> |
| 279 |
<div class="kng-fomo-wizard-section"> |
| 280 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Choose Template', 'king-addons'); ?></h3> |
| 281 |
<div class="kng-fomo-template-grid"> |
| 282 |
<?php foreach ($design_templates as $tpl_key => $tpl): ?> |
| 283 |
<div class="kng-fomo-template-card <?php echo $tpl_key === 'default' ? 'is-selected' : ''; ?>" data-template="<?php echo esc_attr($tpl_key); ?>"> |
| 284 |
<div class="kng-fomo-template-preview kng-fomo-template-preview--<?php echo esc_attr($tpl_key); ?>"> |
| 285 |
<div class="kng-fomo-template-mock"> |
| 286 |
<div class="kng-fomo-template-mock-img"></div> |
| 287 |
<div class="kng-fomo-template-mock-content"> |
| 288 |
<div class="kng-fomo-template-mock-title"></div> |
| 289 |
<div class="kng-fomo-template-mock-text"></div> |
| 290 |
<div class="kng-fomo-template-mock-time"></div> |
| 291 |
</div> |
| 292 |
</div> |
| 293 |
</div> |
| 294 |
<span class="kng-fomo-template-name"><?php echo esc_html($tpl['label']); ?></span> |
| 295 |
<span class="kng-fomo-template-check"> |
| 296 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> |
| 297 |
</span> |
| 298 |
</div> |
| 299 |
<?php endforeach; ?> |
| 300 |
</div> |
| 301 |
</div> |
| 302 |
|
| 303 |
<div class="kng-fomo-wizard-section"> |
| 304 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Position', 'king-addons'); ?></h3> |
| 305 |
<div class="kng-fomo-position-selector"> |
| 306 |
<div class="kng-fomo-position-preview"> |
| 307 |
<div class="kng-fomo-position-dot" data-pos="top-left"></div> |
| 308 |
<div class="kng-fomo-position-dot" data-pos="top-center"></div> |
| 309 |
<div class="kng-fomo-position-dot" data-pos="top-right"></div> |
| 310 |
<div class="kng-fomo-position-dot is-active" data-pos="bottom-left"></div> |
| 311 |
<div class="kng-fomo-position-dot" data-pos="bottom-center"></div> |
| 312 |
<div class="kng-fomo-position-dot" data-pos="bottom-right"></div> |
| 313 |
</div> |
| 314 |
<div class="kng-fomo-position-buttons"> |
| 315 |
<?php foreach ($positions as $pos_key => $pos_label): ?> |
| 316 |
<button type="button" class="kng-fomo-position-btn <?php echo $pos_key === 'bottom-left' ? 'is-active' : ''; ?>" data-position="<?php echo esc_attr($pos_key); ?>"> |
| 317 |
<?php echo esc_html($pos_label); ?> |
| 318 |
</button> |
| 319 |
<?php endforeach; ?> |
| 320 |
</div> |
| 321 |
</div> |
| 322 |
</div> |
| 323 |
|
| 324 |
<div class="kng-fomo-wizard-section"> |
| 325 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Colors', 'king-addons'); ?></h3> |
| 326 |
<div class="kng-fomo-field-row kng-fomo-field-row--3"> |
| 327 |
<div class="kng-fomo-field"> |
| 328 |
<label class="kng-fomo-label"><?php esc_html_e('Background', 'king-addons'); ?></label> |
| 329 |
<div class="kng-fomo-color-field"> |
| 330 |
<input type="color" class="kng-fomo-color-picker" data-field="bg_color" value="#ffffff"> |
| 331 |
<input type="text" class="kng-fomo-input kng-fomo-color-input" data-field="bg_color" data-section="design" value="#ffffff"> |
| 332 |
</div> |
| 333 |
</div> |
| 334 |
<div class="kng-fomo-field"> |
| 335 |
<label class="kng-fomo-label"><?php esc_html_e('Text', 'king-addons'); ?></label> |
| 336 |
<div class="kng-fomo-color-field"> |
| 337 |
<input type="color" class="kng-fomo-color-picker" data-field="text_color" value="#1d1d1f"> |
| 338 |
<input type="text" class="kng-fomo-input kng-fomo-color-input" data-field="text_color" data-section="design" value="#1d1d1f"> |
| 339 |
</div> |
| 340 |
</div> |
| 341 |
<div class="kng-fomo-field"> |
| 342 |
<label class="kng-fomo-label"><?php esc_html_e('Accent', 'king-addons'); ?></label> |
| 343 |
<div class="kng-fomo-color-field"> |
| 344 |
<input type="color" class="kng-fomo-color-picker" data-field="accent_color" value="#0071e3"> |
| 345 |
<input type="text" class="kng-fomo-input kng-fomo-color-input" data-field="accent_color" data-section="design" value="#0071e3"> |
| 346 |
</div> |
| 347 |
</div> |
| 348 |
</div> |
| 349 |
</div> |
| 350 |
|
| 351 |
<div class="kng-fomo-wizard-section"> |
| 352 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Style Options', 'king-addons'); ?></h3> |
| 353 |
<div class="kng-fomo-field-row"> |
| 354 |
<div class="kng-fomo-field"> |
| 355 |
<label class="kng-fomo-label"><?php esc_html_e('Border Radius', 'king-addons'); ?></label> |
| 356 |
<input type="range" class="kng-fomo-input" data-field="border_radius" data-section="design" min="0" max="32" value="16"> |
| 357 |
</div> |
| 358 |
<div class="kng-fomo-field"> |
| 359 |
<label class="kng-fomo-label"><?php esc_html_e('Animation', 'king-addons'); ?></label> |
| 360 |
<select class="kng-fomo-select" data-field="animation" data-section="design"> |
| 361 |
<?php foreach ($animations as $anim_key => $anim_label): ?> |
| 362 |
<option value="<?php echo esc_attr($anim_key); ?>"><?php echo esc_html($anim_label); ?></option> |
| 363 |
<?php endforeach; ?> |
| 364 |
</select> |
| 365 |
</div> |
| 366 |
</div> |
| 367 |
<div class="kng-fomo-field"> |
| 368 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 369 |
<input type="checkbox" data-field="shadow" data-section="design" checked> |
| 370 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Show Shadow', 'king-addons'); ?></span> |
| 371 |
</label> |
| 372 |
</div> |
| 373 |
</div> |
| 374 |
</div> |
| 375 |
</div> |
| 376 |
|
| 377 |
<!-- Step 3: Content --> |
| 378 |
<div class="kng-fomo-wizard-panel" data-step="3"> |
| 379 |
<div class="kng-fomo-wizard-content"> |
| 380 |
<div class="kng-fomo-wizard-section"> |
| 381 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Notification Content', 'king-addons'); ?></h3> |
| 382 |
<div class="kng-fomo-content-auto-hint" style="background: #f0f7ff; border: 1px solid #c8dff7; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #1d4f8e; display: none;"> |
| 383 |
<strong><?php esc_html_e('Tip:', 'king-addons'); ?></strong> |
| 384 |
<span class="kng-fomo-content-hint-text"><?php esc_html_e('Templates are auto-filled for your notification type. Customize below or leave as-is.', 'king-addons'); ?></span> |
| 385 |
</div> |
| 386 |
<div class="kng-fomo-field"> |
| 387 |
<label class="kng-fomo-label"><?php esc_html_e('Title Template', 'king-addons'); ?></label> |
| 388 |
<input type="text" class="kng-fomo-input" data-field="title" data-section="content" placeholder="<?php esc_attr_e('{{name}}', 'king-addons'); ?>"> |
| 389 |
<p class="kng-fomo-field-help"><?php esc_html_e('Placeholders: {{name}}, {{product}}, {{location}}, {{time}}, {{content}}, {{email}}, {{downloads}}, {{active_installs}}', 'king-addons'); ?></p> |
| 390 |
</div> |
| 391 |
<div class="kng-fomo-field"> |
| 392 |
<label class="kng-fomo-label"><?php esc_html_e('Message Template', 'king-addons'); ?></label> |
| 393 |
<textarea class="kng-fomo-textarea" data-field="message" data-section="content" placeholder="<?php esc_attr_e('just purchased {{product}}', 'king-addons'); ?>"></textarea> |
| 394 |
<p class="kng-fomo-field-help"><?php esc_html_e('Use {{placeholders}} to show dynamic data from each entry', 'king-addons'); ?></p> |
| 395 |
</div> |
| 396 |
</div> |
| 397 |
|
| 398 |
<div class="kng-fomo-wizard-section"> |
| 399 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Image', 'king-addons'); ?></h3> |
| 400 |
<div class="kng-fomo-field"> |
| 401 |
<label class="kng-fomo-label"><?php esc_html_e('Image Source', 'king-addons'); ?></label> |
| 402 |
<select class="kng-fomo-select" data-field="image_type" data-section="content"> |
| 403 |
<option value="product"><?php esc_html_e('Product Image', 'king-addons'); ?></option> |
| 404 |
<option value="avatar"><?php esc_html_e('User Avatar', 'king-addons'); ?></option> |
| 405 |
<option value="custom"><?php esc_html_e('Custom Image', 'king-addons'); ?></option> |
| 406 |
<option value="none"><?php esc_html_e('No Image', 'king-addons'); ?></option> |
| 407 |
</select> |
| 408 |
</div> |
| 409 |
</div> |
| 410 |
|
| 411 |
<div class="kng-fomo-wizard-section"> |
| 412 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Call to Action', 'king-addons'); ?></h3> |
| 413 |
<div class="kng-fomo-field-row"> |
| 414 |
<div class="kng-fomo-field"> |
| 415 |
<label class="kng-fomo-label"><?php esc_html_e('CTA Text', 'king-addons'); ?> <span class="kng-fomo-label-hint"><?php esc_html_e('(optional)', 'king-addons'); ?></span></label> |
| 416 |
<input type="text" class="kng-fomo-input" data-field="cta_text" data-section="content" placeholder="<?php esc_attr_e('View Product', 'king-addons'); ?>"> |
| 417 |
</div> |
| 418 |
<div class="kng-fomo-field"> |
| 419 |
<label class="kng-fomo-label"><?php esc_html_e('CTA Link', 'king-addons'); ?></label> |
| 420 |
<input type="url" class="kng-fomo-input" data-field="cta_url" data-section="content" placeholder="<?php esc_attr_e('https://...', 'king-addons'); ?>"> |
| 421 |
</div> |
| 422 |
</div> |
| 423 |
</div> |
| 424 |
|
| 425 |
<div class="kng-fomo-wizard-section"> |
| 426 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Time Display', 'king-addons'); ?></h3> |
| 427 |
<div class="kng-fomo-field"> |
| 428 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 429 |
<input type="checkbox" data-field="show_time" data-section="content" checked> |
| 430 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Show time ago', 'king-addons'); ?></span> |
| 431 |
</label> |
| 432 |
</div> |
| 433 |
<div class="kng-fomo-field"> |
| 434 |
<label class="kng-fomo-label"><?php esc_html_e('Time Format', 'king-addons'); ?></label> |
| 435 |
<select class="kng-fomo-select" data-field="time_format" data-section="content"> |
| 436 |
<option value="relative"><?php esc_html_e('Relative (5 mins ago)', 'king-addons'); ?></option> |
| 437 |
<option value="absolute"><?php esc_html_e('Absolute (Jan 5, 2024)', 'king-addons'); ?></option> |
| 438 |
</select> |
| 439 |
</div> |
| 440 |
</div> |
| 441 |
</div> |
| 442 |
</div> |
| 443 |
|
| 444 |
<!-- Step 4: Display --> |
| 445 |
<div class="kng-fomo-wizard-panel" data-step="4"> |
| 446 |
<div class="kng-fomo-wizard-content"> |
| 447 |
<div class="kng-fomo-wizard-section"> |
| 448 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Timing', 'king-addons'); ?></h3> |
| 449 |
<div class="kng-fomo-field-row kng-fomo-field-row--3"> |
| 450 |
<div class="kng-fomo-field"> |
| 451 |
<label class="kng-fomo-label"><?php esc_html_e('Initial Delay', 'king-addons'); ?></label> |
| 452 |
<input type="number" class="kng-fomo-input" data-field="delay" data-section="display" value="3" min="0" max="60"> |
| 453 |
<p class="kng-fomo-field-help"><?php esc_html_e('Seconds', 'king-addons'); ?></p> |
| 454 |
</div> |
| 455 |
<div class="kng-fomo-field"> |
| 456 |
<label class="kng-fomo-label"><?php esc_html_e('Display Duration', 'king-addons'); ?></label> |
| 457 |
<input type="number" class="kng-fomo-input" data-field="duration" data-section="display" value="5" min="1" max="30"> |
| 458 |
<p class="kng-fomo-field-help"><?php esc_html_e('Seconds', 'king-addons'); ?></p> |
| 459 |
</div> |
| 460 |
<div class="kng-fomo-field"> |
| 461 |
<label class="kng-fomo-label"><?php esc_html_e('Interval Between', 'king-addons'); ?></label> |
| 462 |
<input type="number" class="kng-fomo-input" data-field="interval" data-section="display" value="10" min="1" max="120"> |
| 463 |
<p class="kng-fomo-field-help"><?php esc_html_e('Seconds', 'king-addons'); ?></p> |
| 464 |
</div> |
| 465 |
</div> |
| 466 |
<div class="kng-fomo-field"> |
| 467 |
<label class="kng-fomo-label"><?php esc_html_e('Max Per Session', 'king-addons'); ?></label> |
| 468 |
<input type="number" class="kng-fomo-input" data-field="max_per_session" data-section="display" value="5" min="1" max="50"> |
| 469 |
<p class="kng-fomo-field-help"><?php esc_html_e('Maximum notifications to show per visitor session', 'king-addons'); ?></p> |
| 470 |
</div> |
| 471 |
<div class="kng-fomo-field-row"> |
| 472 |
<div class="kng-fomo-field"> |
| 473 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 474 |
<input type="checkbox" data-field="loop" data-section="display" checked> |
| 475 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Loop Notifications', 'king-addons'); ?></span> |
| 476 |
</label> |
| 477 |
<p class="kng-fomo-field-help"><?php esc_html_e('Restart from the beginning after showing all entries', 'king-addons'); ?></p> |
| 478 |
</div> |
| 479 |
<div class="kng-fomo-field"> |
| 480 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 481 |
<input type="checkbox" data-field="random" data-section="display"> |
| 482 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Random Order', 'king-addons'); ?></span> |
| 483 |
</label> |
| 484 |
<p class="kng-fomo-field-help"><?php esc_html_e('Show entries in random order instead of sequential', 'king-addons'); ?></p> |
| 485 |
</div> |
| 486 |
</div> |
| 487 |
</div> |
| 488 |
|
| 489 |
<div class="kng-fomo-wizard-section"> |
| 490 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Devices', 'king-addons'); ?></h3> |
| 491 |
<div style="display: flex; gap: 24px;"> |
| 492 |
<label style="display: flex; align-items: center; gap: 8px;"> |
| 493 |
<input type="checkbox" class="kng-fomo-device-check" value="desktop" checked> |
| 494 |
<span><?php esc_html_e('Desktop', 'king-addons'); ?></span> |
| 495 |
</label> |
| 496 |
<label style="display: flex; align-items: center; gap: 8px;"> |
| 497 |
<input type="checkbox" class="kng-fomo-device-check" value="tablet" checked> |
| 498 |
<span><?php esc_html_e('Tablet', 'king-addons'); ?></span> |
| 499 |
</label> |
| 500 |
<label style="display: flex; align-items: center; gap: 8px;"> |
| 501 |
<input type="checkbox" class="kng-fomo-device-check" value="mobile" checked> |
| 502 |
<span><?php esc_html_e('Mobile', 'king-addons'); ?></span> |
| 503 |
</label> |
| 504 |
</div> |
| 505 |
</div> |
| 506 |
|
| 507 |
<div class="kng-fomo-wizard-section"> |
| 508 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Page Rules', 'king-addons'); ?></h3> |
| 509 |
<div class="kng-fomo-field"> |
| 510 |
<label class="kng-fomo-label"><?php esc_html_e('Display On', 'king-addons'); ?></label> |
| 511 |
<select class="kng-fomo-select" data-field="pages" data-section="display"> |
| 512 |
<option value="all"><?php esc_html_e('All Pages', 'king-addons'); ?></option> |
| 513 |
<option value="specific"><?php esc_html_e('Specific Pages', 'king-addons'); ?></option> |
| 514 |
</select> |
| 515 |
</div> |
| 516 |
<div class="kng-fomo-page-rules" style="margin-top: 16px;"></div> |
| 517 |
<button type="button" class="kng-fomo-btn kng-fomo-btn--ghost kng-fomo-btn--sm kng-fomo-add-rule" style="margin-top: 12px;"> |
| 518 |
<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"><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> |
| 519 |
<?php esc_html_e('Add Rule', 'king-addons'); ?> |
| 520 |
</button> |
| 521 |
</div> |
| 522 |
|
| 523 |
<div class="kng-fomo-wizard-section"> |
| 524 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Audience', 'king-addons'); ?></h3> |
| 525 |
<div class="kng-fomo-field"> |
| 526 |
<label class="kng-fomo-label"><?php esc_html_e('Show To', 'king-addons'); ?></label> |
| 527 |
<select class="kng-fomo-select" data-field="audience" data-section="display"> |
| 528 |
<option value="all"><?php esc_html_e('Everyone', 'king-addons'); ?></option> |
| 529 |
<option value="logged_in"><?php esc_html_e('Logged In Users Only', 'king-addons'); ?></option> |
| 530 |
<option value="logged_out"><?php esc_html_e('Guests Only', 'king-addons'); ?></option> |
| 531 |
</select> |
| 532 |
</div> |
| 533 |
</div> |
| 534 |
</div> |
| 535 |
</div> |
| 536 |
|
| 537 |
<!-- Step 5: Customize --> |
| 538 |
<div class="kng-fomo-wizard-panel" data-step="5"> |
| 539 |
<div class="kng-fomo-wizard-content"> |
| 540 |
<div class="kng-fomo-wizard-section"> |
| 541 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Advanced Options', 'king-addons'); ?></h3> |
| 542 |
<div class="kng-fomo-field"> |
| 543 |
<label class="kng-fomo-label"><?php esc_html_e('Z-Index', 'king-addons'); ?></label> |
| 544 |
<input type="number" class="kng-fomo-input" data-field="z_index" data-section="customize" value="99999"> |
| 545 |
<p class="kng-fomo-field-help"><?php esc_html_e('Higher values appear on top of other elements', 'king-addons'); ?></p> |
| 546 |
</div> |
| 547 |
<div class="kng-fomo-field"> |
| 548 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 549 |
<input type="checkbox" data-field="close_button" data-section="customize" checked> |
| 550 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Show Close Button', 'king-addons'); ?></span> |
| 551 |
</label> |
| 552 |
</div> |
| 553 |
<div class="kng-fomo-field"> |
| 554 |
<label class="kng-fomo-label"><?php esc_html_e('Click Action', 'king-addons'); ?></label> |
| 555 |
<select class="kng-fomo-select" data-field="click_action" data-section="customize"> |
| 556 |
<option value="link"><?php esc_html_e('Open Link', 'king-addons'); ?></option> |
| 557 |
<option value="dismiss"><?php esc_html_e('Dismiss Notification', 'king-addons'); ?></option> |
| 558 |
<option value="nothing"><?php esc_html_e('Do Nothing', 'king-addons'); ?></option> |
| 559 |
</select> |
| 560 |
</div> |
| 561 |
</div> |
| 562 |
|
| 563 |
<div class="kng-fomo-wizard-section"> |
| 564 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Sound & Analytics', 'king-addons'); ?></h3> |
| 565 |
<div class="kng-fomo-field"> |
| 566 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 567 |
<input type="checkbox" data-field="sound" data-section="customize"> |
| 568 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Play Sound', 'king-addons'); ?></span> |
| 569 |
</label> |
| 570 |
<p class="kng-fomo-field-help"><?php esc_html_e('Play a subtle notification sound', 'king-addons'); ?></p> |
| 571 |
</div> |
| 572 |
<div class="kng-fomo-field"> |
| 573 |
<label style="display: flex; align-items: center; gap: 12px;"> |
| 574 |
<input type="checkbox" data-field="analytics" data-section="customize" checked> |
| 575 |
<span class="kng-fomo-label" style="margin: 0;"><?php esc_html_e('Enable Analytics', 'king-addons'); ?></span> |
| 576 |
</label> |
| 577 |
<p class="kng-fomo-field-help"><?php esc_html_e('Track views and clicks for this notification', 'king-addons'); ?></p> |
| 578 |
</div> |
| 579 |
</div> |
| 580 |
|
| 581 |
<!-- Live Preview --> |
| 582 |
<div class="kng-fomo-wizard-section"> |
| 583 |
<h3 class="kng-fomo-wizard-section-title"><?php esc_html_e('Preview', 'king-addons'); ?></h3> |
| 584 |
<div class="kng-fomo-preview-wrap" style="background: var(--kng-fomo-bg-secondary); border-radius: 16px; padding: 40px; position: relative; min-height: 200px;"> |
| 585 |
<div class="kng-fomo-preview-notification pos-bottom-left has-shadow" style="position: absolute;"> |
| 586 |
<div style="display: flex; gap: 12px; padding: 16px; background: var(--bg-color, #fff); border-radius: var(--border-radius, 16px); box-shadow: 0 4px 20px rgba(0,0,0,0.1); max-width: 340px;"> |
| 587 |
<div style="width: 56px; height: 56px; background: var(--kng-fomo-bg-secondary); border-radius: 10px; flex-shrink: 0;"></div> |
| 588 |
<div style="flex: 1;"> |
| 589 |
<div class="kng-fomo-preview-title" style="font-size: 14px; font-weight: 600; color: var(--text-color, #1d1d1f); margin-bottom: 4px;"><?php esc_html_e('John Doe just purchased', 'king-addons'); ?></div> |
| 590 |
<div class="kng-fomo-preview-message" style="font-size: 13px; color: var(--text-color, #86868b); opacity: 0.8;"><?php esc_html_e('Premium Product from New York', 'king-addons'); ?></div> |
| 591 |
<div style="font-size: 11px; color: var(--accent-color, #0071e3); margin-top: 8px;"><?php esc_html_e('5 mins ago', 'king-addons'); ?></div> |
| 592 |
</div> |
| 593 |
<button class="kng-fomo-preview-close" style="position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: var(--kng-fomo-bg-secondary); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;"> |
| 594 |
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> |
| 595 |
</button> |
| 596 |
</div> |
| 597 |
</div> |
| 598 |
</div> |
| 599 |
</div> |
| 600 |
</div> |
| 601 |
</div> |
| 602 |
|
| 603 |
<!-- Footer --> |
| 604 |
<div class="kng-fomo-wizard-footer"> |
| 605 |
<button type="button" class="kng-fomo-btn kng-fomo-btn--ghost kng-fomo-wizard-prev" style="display: none;"> |
| 606 |
<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="15 18 9 12 15 6"></polyline></svg> |
| 607 |
<?php esc_html_e('Previous', 'king-addons'); ?> |
| 608 |
</button> |
| 609 |
<div style="flex: 1;"></div> |
| 610 |
<button type="button" class="kng-fomo-btn kng-fomo-btn--primary kng-fomo-wizard-next"> |
| 611 |
<?php esc_html_e('Next', 'king-addons'); ?> |
| 612 |
<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="9 18 15 12 9 6"></polyline></svg> |
| 613 |
</button> |
| 614 |
<button type="button" class="kng-fomo-btn kng-fomo-btn--primary kng-fomo-save-notification" style="display: none;"> |
| 615 |
<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> |
| 616 |
<?php esc_html_e('Save Notification', 'king-addons'); ?> |
| 617 |
</button> |
| 618 |
</div> |
| 619 |
</div> |
| 620 |
|
| 621 |
</div> |
| 622 |
|
| 623 |
<style> |
| 624 |
.kng-fomo-position-item.is-active { |
| 625 |
border-color: var(--kng-fomo-primary) !important; |
| 626 |
background: var(--kng-fomo-primary-light) !important; |
| 627 |
} |
| 628 |
|
| 629 |
.kng-fomo-preview-notification.pos-bottom-left { bottom: 20px; left: 20px; } |
| 630 |
.kng-fomo-preview-notification.pos-bottom-right { bottom: 20px; right: 20px; left: auto; } |
| 631 |
.kng-fomo-preview-notification.pos-top-left { top: 20px; left: 20px; bottom: auto; } |
| 632 |
.kng-fomo-preview-notification.pos-top-right { top: 20px; right: 20px; bottom: auto; left: auto; } |
| 633 |
.kng-fomo-preview-notification.pos-bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); } |
| 634 |
.kng-fomo-preview-notification.pos-top-center { top: 20px; left: 50%; transform: translateX(-50%); bottom: auto; } |
| 635 |
|
| 636 |
.kng-fomo-page-rule { |
| 637 |
display: flex; |
| 638 |
gap: 8px; |
| 639 |
margin-bottom: 8px; |
| 640 |
} |
| 641 |
|
| 642 |
.kng-fomo-page-rule .kng-fomo-input--sm { |
| 643 |
flex: 1; |
| 644 |
} |
| 645 |
</style> |
| 646 |
|