PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.86
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.86
51.1.86 51.1.84 51.1.85 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 All 40 releases
← All changes | includes/extensions/Activity_Log/templates/admin-page.php +28 -11 51.1.44 → 51.1.86 View file →
@@ -11,9 +11,9 @@
11 11
12 12 $theme_mode = get_user_meta(get_current_user_id(), 'king_addons_theme_mode', true);
13 13 $allowed_theme_modes = ['dark', 'light', 'auto'];
14 14 if (!in_array($theme_mode, $allowed_theme_modes, true)) {
15 - $theme_mode = 'dark';
15 + $theme_mode = 'auto';
16 16 }
17 17
18 18 $tabs = [
19 19 'dashboard' => [
@@ -41,11 +41,23 @@
41 41 'icon' => 'dashicons-admin-tools',
42 42 ],
43 43 ];
44 44
45 -$base_url = admin_url('admin.php?page=king-addons-activity-log');
45 +$current_page = isset($_GET['page']) ? sanitize_key($_GET['page']) : 'king-addons-activity-log';
46 +$base_url = admin_url('admin.php?page=' . $current_page);
46 47 $current_view = array_key_exists($view, $tabs) ? $view : 'dashboard';
47 48
49 +$can_manage = current_user_can('manage_options');
50 +if (!$can_manage) {
51 + $tabs = [
52 + 'logs' => [
53 + 'label' => esc_html__('Logs', 'king-addons'),
54 + 'icon' => 'dashicons-clipboard',
55 + ],
56 + ];
57 + $current_view = 'logs';
58 +}
59 +
48 60 $message_code = isset($_GET['message']) ? sanitize_key($_GET['message']) : '';
49 61 $messages = [
50 62 'saved' => esc_html__('Settings saved.', 'king-addons'),
51 63 'alerts_saved' => esc_html__('Alert settings saved.', 'king-addons'),
@@ -76,26 +88,31 @@
76 88 <span class="dashicons dashicons-shield-alt"></span>
77 89 </div>
78 90 <div>
79 91 <h1 class="ka-admin-title"><?php esc_html_e('Activity Log', 'king-addons'); ?></h1>
80 - <p class="ka-admin-subtitle"><?php esc_html_e('Audit critical actions across your WordPress site in Apple-inspired clarity.', 'king-addons'); ?></p>
92 + <p class="ka-admin-subtitle"><?php esc_html_e('Audit critical actions across your WordPress site in Premium style inspired clarity.', 'king-addons'); ?></p>
81 93 </div>
82 94 </div>
83 95 <div class="ka-admin-header-actions">
84 96 <span class="ka-status <?php echo $logging_enabled ? 'ka-status-enabled' : 'ka-status-disabled'; ?>">
85 97 <span class="ka-status-dot"></span>
86 - <?php echo $logging_enabled ? esc_html__('Logging On', 'king-addons') : esc_html__('Logging Off', 'king-addons'); ?>
98 + <?php echo $logging_enabled ? esc_html__('Enabled', 'king-addons') : esc_html__('Disabled', 'king-addons'); ?>
87 99 </span>
88 100 <div class="ka-v3-segmented" id="ka-v3-theme-segment" role="radiogroup" aria-label="Theme" data-active="<?php echo esc_attr($theme_mode); ?>">
89 101 <span class="ka-v3-segmented-indicator" aria-hidden="true"></span>
90 - <button type="button" class="ka-v3-segmented-btn" data-theme="light" aria-pressed="<?php echo $theme_mode === 'light' ? 'true' : 'false'; ?>"><?php esc_html_e('Light', 'king-addons'); ?></button>
91 - <button type="button" class="ka-v3-segmented-btn" data-theme="dark" aria-pressed="<?php echo $theme_mode === 'dark' ? 'true' : 'false'; ?>"><?php esc_html_e('Dark', 'king-addons'); ?></button>
92 - <button type="button" class="ka-v3-segmented-btn" data-theme="auto" aria-pressed="<?php echo $theme_mode === 'auto' ? 'true' : 'false'; ?>"><?php esc_html_e('Auto', 'king-addons'); ?></button>
102 + <button type="button" class="ka-v3-segmented-btn" data-theme="light" aria-pressed="<?php echo $theme_mode === 'light' ? 'true' : 'false'; ?>">
103 + <span class="ka-v3-segmented-icon" aria-hidden="true">☀︎</span>
104 + <?php esc_html_e('Light', 'king-addons'); ?>
105 + </button>
106 + <button type="button" class="ka-v3-segmented-btn" data-theme="dark" aria-pressed="<?php echo $theme_mode === 'dark' ? 'true' : 'false'; ?>">
107 + <span class="ka-v3-segmented-icon" aria-hidden="true">☾</span>
108 + <?php esc_html_e('Dark', 'king-addons'); ?>
109 + </button>
110 + <button type="button" class="ka-v3-segmented-btn" data-theme="auto" aria-pressed="<?php echo $theme_mode === 'auto' ? 'true' : 'false'; ?>">
111 + <span class="ka-v3-segmented-icon" aria-hidden="true">◐</span>
112 + <?php esc_html_e('Auto', 'king-addons'); ?>
113 + </button>
93 114 </div>
94 - <a href="<?php echo esc_url(add_query_arg(['view' => 'logs'], $base_url)); ?>" class="ka-btn ka-btn-primary">
95 - <span class="dashicons dashicons-clipboard"></span>
96 - <?php esc_html_e('View Logs', 'king-addons'); ?>
97 - </a>
98 115 </div>
99 116 </div>
100 117
101 118 <div class="ka-tabs kng-activity-tabs">