PluginProbe
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder / 51.1.76
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder v51.1.76
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 / Activity_Log / templates / view-alerts.php

view-alerts.php in King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder 51.1.76, at includes/extensions/Activity_Log/templates/view-alerts.php

59 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Activity Log alerts view.
4 *
5 * @package King_Addons
6 */
7
8 if (!defined('ABSPATH')) {
9 exit;
10 }
11
12 $alerts = $settings['alerts'] ?? [];
13 $emails = $alerts['failed_login_emails'] ?? '';
14 if ($emails === '') {
15 $emails = get_option('admin_email');
16 }
17 ?>
18
19 <div class="ka-card">
20 <div class="ka-card-header">
21 <span class="dashicons dashicons-warning purple"></span>
22 <h2><?php esc_html_e('Failed Login Alert', 'king-addons'); ?></h2>
23 </div>
24 <div class="ka-card-body">
25 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>" class="kng-activity-alert-form">
26 <input type="hidden" name="action" value="kng_activity_log_save_alerts">
27 <?php wp_nonce_field('kng_activity_log_alerts'); ?>
28
29 <label class="ka-toggle">
30 <input type="checkbox" name="failed_login_enabled" value="1" <?php checked(!empty($alerts['failed_login_enabled'])); ?> />
31 <span class="ka-toggle-slider"></span>
32 <span class="ka-toggle-label"><?php esc_html_e('Enable failed login alert', 'king-addons'); ?></span>
33 </label>
34
35 <div class="kng-activity-alert-grid">
36 <div class="kng-field">
37 <label><?php esc_html_e('Threshold', 'king-addons'); ?></label>
38 <input type="number" min="1" max="50" name="failed_login_threshold" value="<?php echo esc_attr($alerts['failed_login_threshold'] ?? 5); ?>">
39 <small><?php esc_html_e('Failed logins before alert triggers.', 'king-addons'); ?></small>
40 </div>
41 <div class="kng-field">
42 <label><?php esc_html_e('Window (minutes)', 'king-addons'); ?></label>
43 <input type="number" min="1" max="60" name="failed_login_window" value="<?php echo esc_attr($alerts['failed_login_window'] ?? 10); ?>">
44 <small><?php esc_html_e('Rolling time window.', 'king-addons'); ?></small>
45 </div>
46 <div class="kng-field">
47 <label><?php esc_html_e('Email Recipients', 'king-addons'); ?></label>
48 <input type="text" name="failed_login_emails" value="<?php echo esc_attr($emails); ?>" placeholder="security@example.com">
49 <small><?php esc_html_e('Comma-separated list of emails.', 'king-addons'); ?></small>
50 </div>
51 </div>
52
53 <button type="submit" class="ka-btn ka-btn-primary">
54 <?php esc_html_e('Save Alert', 'king-addons'); ?>
55 </button>
56 </form>
57 </div>
58 </div>
59