PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 1.10.0
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v1.10.0
3.3.9 3.3.8 trunk 1.0 1.1.0 1.10.0 1.11.0 1.11.1 1.12.0 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.2.0 1.20.0 1.20.1 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 All 67 releases
logtivity / views / settings.php

settings.php in Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity 1.10.0, at views/settings.php

169 lines 8.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php echo logtivity_view('_admin-header'); ?>
2
3 <div class="postbox">
4 <div class="inside logtivity-settings">
5
6 <h1 style="padding-top: 20px;">Settings</h1>
7
8 <form action="<?php echo admin_url( 'admin-ajax.php' ); ?>?action=logtivity_update_settings" method="post">
9
10 <?php wp_nonce_field( 'logtivity_update_settings', 'logtivity_update_settings' ) ?>
11
12 <table class="form-table">
13 <tbody>
14 <tr class="user-user-login-wrap">
15 <th>
16 <label for="logtivity_site_api_key">Site API Key</label>
17 <?php if (has_filter('logtivity_site_api_key')): ?>
18 <div class="logtivity-constant">This option has been set in code.</div>
19 <?php endif ?>
20 </th>
21 <td>
22 <input <?php echo ( has_filter('logtivity_site_api_key') ? 'readonly' : ''); ?> type="text" name="logtivity_site_api_key" id="logtivity_site_api_key" value="<?php echo sanitize_text_field($options['logtivity_site_api_key']); ?>" class="regular-text">
23 <?php if ($options['logtivity_api_key_check']): ?>
24 <p>Status: <?php echo ( sanitize_text_field($options['logtivity_api_key_check']) != 'fail' ? '<span style="color: #4caf50; font-weight: bold;">Connected</span>' : '<span style="color: #ff3232; font-weight: bold;">Not connected. Please check API key.</span>'); ?></p>
25 <?php endif ?>
26 </td>
27 <td>
28 <span class="description">You can find this value by logging into your account and navigating to/creating this site settings page.</span>
29 </td>
30 </tr>
31 <tr class="user-user-login-wrap">
32 <th>
33 <label for="logtivity_disable_default_logging">Disable built in Event Logging.</label>
34 <?php if (has_filter('logtivity_disable_default_logging')): ?>
35 <div class="logtivity-constant">This option has been set in code.</div>
36 <?php endif ?>
37 </th>
38 <td>
39 <input type="hidden" name="logtivity_disable_default_logging" id="logtivity_disable_default_logging" value="0">
40
41 <input <?php echo ( has_filter('logtivity_disable_default_logging') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_disable_default_logging" id="logtivity_disable_default_logging" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_disable_default_logging']) ? 'checked' : ''); ?>>
42 </td>
43 <td>
44 <span class="description">Check this box if you do not want the plugin to log actions automatically and you would prefer to manually log specific actions with code.</span>
45 </td>
46 </tr>
47 <tr class="user-user-login-wrap">
48 <th>
49 <label for="logtivity_should_store_user_id">Store User ID</label>
50 <?php if (has_filter('logtivity_should_store_user_id')): ?>
51 <div class="logtivity-constant">This option has been set in code.</div>
52 <?php endif ?>
53 </th>
54 <td>
55 <input type="hidden" name="logtivity_should_store_user_id" id="logtivity_should_store_user_id" value="0">
56
57 <input <?php echo ( has_filter('logtivity_should_store_user_id') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_should_store_user_id" id="logtivity_should_store_user_id" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_should_store_user_id']) ? 'checked' : ''); ?>>
58 </td>
59 <td>
60 <span class="description">If you check this box, when logging an action, we will include the users User ID in the logged action.</span>
61 </td>
62 </tr>
63 <tr class="user-user-login-wrap">
64 <th>
65 <label for="logtivity_should_log_profile_link">Store Users Profile Link</label>
66 <?php if (has_filter('logtivity_should_log_profile_link')): ?>
67 <div class="logtivity-constant">This option has been set in code.</div>
68 <?php endif ?>
69 </th>
70 <td>
71 <input type="hidden" name="logtivity_should_log_profile_link" id="logtivity_should_log_profile_link" value="0">
72
73 <input <?php echo ( has_filter('logtivity_should_log_profile_link') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_should_log_profile_link" id="logtivity_should_log_profile_link" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_should_log_profile_link']) ? 'checked' : ''); ?>>
74 </td>
75 <td>
76 <span class="description">If you check this box, when logging an action, we will include the users profile link in the logged action.</span>
77 </td>
78 </tr>
79 <tr class="user-user-login-wrap">
80 <th>
81 <label for="logtivity_should_log_username">Store Users Username</label>
82 <?php if (has_filter('logtivity_should_log_username')): ?>
83 <div class="logtivity-constant">This option has been set in code.</div>
84 <?php endif ?>
85 </th>
86 <td>
87 <input type="hidden" name="logtivity_should_log_username" id="logtivity_should_log_username" value="0">
88
89 <input <?php echo ( has_filter('logtivity_should_log_username') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_should_log_username" id="logtivity_should_log_username" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_should_log_username']) ? 'checked' : ''); ?>>
90 </td>
91 <td>
92 <span class="description">If you check this box, when logging an action, we will include the users username in the logged action.</span>
93 </td>
94 </tr>
95 <tr class="user-user-login-wrap">
96 <th>
97 <label for="logtivity_should_store_ip">Store Users IP Address</label>
98 <?php if (has_filter('logtivity_should_store_ip')): ?>
99 <div class="logtivity-constant">This option has been set in code.</div>
100 <?php endif ?>
101 </th>
102 <td>
103 <input type="hidden" name="logtivity_should_store_ip" id="logtivity_should_store_ip" value="0">
104
105 <input <?php echo ( has_filter('logtivity_should_store_ip') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_should_store_ip" id="logtivity_should_store_ip" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_should_store_ip']) ? 'checked' : ''); ?>>
106 </td>
107 <td>
108 <span class="description">If you check this box, when logging an action, we will include the users IP address in the logged action.</span>
109 </td>
110 </tr>
111 <tr class="user-user-login-wrap">
112 <th>
113 <label for="logtivity_enable_debug_mode">Enable debug mode (recommended off by default)</label>
114 <?php if (has_filter('logtivity_enable_debug_mode')): ?>
115 <div class="logtivity-constant">This option has been set in code.</div>
116 <?php endif ?>
117 </th>
118 <td>
119 <input type="hidden" name="logtivity_enable_debug_mode" id="logtivity_enable_debug_mode" value="0">
120
121 <input <?php echo ( has_filter('logtivity_enable_debug_mode') ? 'readonly' : ''); ?> type="checkbox" name="logtivity_enable_debug_mode" id="logtivity_enable_debug_mode" value="1" class="regular-checkbox" <?php echo ( absint($options['logtivity_enable_debug_mode']) ? 'checked' : ''); ?>>
122 </td>
123 <td>
124 <span class="description">This will log the latest response from the Logtivity API. This can be useful for debugging the result from an API call when storing a log. We <strong>recommend setting this to off by default</strong> as this will allow us to send logs asynchronously and not wait for a response from the API. This will be more performant.</span>
125 </td>
126 </tr>
127 </tbody>
128 </table>
129
130 <p class="submit">
131 <input type="submit" name="submit" id="submit" class="button button-primary" value="Update Settings">
132 </p>
133
134 </form>
135
136 </div>
137 </div>
138
139 <?php if (absint( $options['logtivity_enable_debug_mode'] )): ?>
140
141 <div class="postbox">
142 <div class="inside">
143
144 <h3>Latest Response</h3>
145
146 <?php if ($latest_response = $options['logtivity_latest_response']): ?>
147
148 <h4>Date: <?php echo sanitize_text_field($latest_response['date']); ?></h4>
149
150 <?php if ($latest_response['response']): ?>
151 <code style="display: block; padding: 20px;">
152
153 <?php echo sanitize_text_field($latest_response['response']); ?>
154
155 </code>
156 <?php endif ?>
157
158 <?php else: ?>
159
160 <p>The latest logging response will appear here after an event has been logged.</p>
161
162 <?php endif ?>
163
164 </div>
165 </div>
166
167 <?php endif ?>
168
169 <?php echo logtivity_view('_admin-footer', compact('options')); ?>