PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 1.15.0
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v1.15.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.15.0, at views/settings.php

195 lines 9.5 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 logtivity-settings">
4 <?php if (logtivity_has_site_url_changed()): ?>
5 <div style="background: #DC3232;color: #fff;padding: 1em">
6 <h2 style="color: white; padding-left: 0" class="title">We've detected a change in your site URL.</h2>
7 <p>Is this a dev or staging environment? As a precaution, we've stopped logging. To start recording logs, again click the 'Update Settings' button below.</p>
8 </div>
9 <?php endif ?>
10
11 <div class="inside">
12 <h1 style="padding-top: 20px;">Settings</h1>
13
14 <form action="<?php echo admin_url( 'admin-ajax.php' ); ?>?action=logtivity_update_settings" method="post">
15
16 <?php wp_nonce_field( 'logtivity_update_settings', 'logtivity_update_settings' ) ?>
17
18 <table class="form-table">
19 <tbody>
20 <tr class="user-user-login-wrap">
21 <th>
22 <label for="logtivity_site_api_key">Site API Key</label>
23 <?php if (has_filter('logtivity_site_api_key')): ?>
24 <div class="logtivity-constant">This option has been set in code.</div>
25 <?php endif ?>
26 </th>
27 <td>
28 <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">
29 <?php if ($options['logtivity_api_key_check']): ?>
30 <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>
31 <?php endif ?>
32 </td>
33 <td>
34 <span class="description">You can find this value by logging into your account and navigating to/creating this site settings page.</span>
35 </td>
36 </tr>
37 <tr class="user-user-login-wrap">
38 <th>
39 <label for="logtivity_disable_default_logging">Disable built in Event Logging.</label>
40 <?php if (has_filter('logtivity_disable_default_logging')): ?>
41 <div class="logtivity-constant">This option has been set in code.</div>
42 <?php endif ?>
43 </th>
44 <td>
45 <input type="hidden" name="logtivity_disable_default_logging" id="logtivity_disable_default_logging" value="0">
46
47 <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' : ''); ?>>
48 </td>
49 <td>
50 <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>
51 </td>
52 </tr>
53 <tr class="user-user-login-wrap">
54 <th>
55 <label for="logtivity_should_store_user_id">Store User ID</label>
56 <?php if (has_filter('logtivity_should_store_user_id')): ?>
57 <div class="logtivity-constant">This option has been set in code.</div>
58 <?php endif ?>
59 </th>
60 <td>
61 <input type="hidden" name="logtivity_should_store_user_id" id="logtivity_should_store_user_id" value="0">
62
63 <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' : ''); ?>>
64 </td>
65 <td>
66 <span class="description">If you check this box, when logging an action, we will include the users User ID in the logged action.</span>
67 </td>
68 </tr>
69 <tr class="user-user-login-wrap">
70 <th>
71 <label for="logtivity_should_log_profile_link">Store Users Profile Link</label>
72 <?php if (has_filter('logtivity_should_log_profile_link')): ?>
73 <div class="logtivity-constant">This option has been set in code.</div>
74 <?php endif ?>
75 </th>
76 <td>
77 <input type="hidden" name="logtivity_should_log_profile_link" id="logtivity_should_log_profile_link" value="0">
78
79 <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' : ''); ?>>
80 </td>
81 <td>
82 <span class="description">If you check this box, when logging an action, we will include the users profile link in the logged action.</span>
83 </td>
84 </tr>
85 <tr class="user-user-login-wrap">
86 <th>
87 <label for="logtivity_should_log_username">Store Users Username</label>
88 <?php if (has_filter('logtivity_should_log_username')): ?>
89 <div class="logtivity-constant">This option has been set in code.</div>
90 <?php endif ?>
91 </th>
92 <td>
93 <input type="hidden" name="logtivity_should_log_username" id="logtivity_should_log_username" value="0">
94
95 <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' : ''); ?>>
96 </td>
97 <td>
98 <span class="description">If you check this box, when logging an action, we will include the users username in the logged action.</span>
99 </td>
100 </tr>
101 <tr class="user-user-login-wrap">
102 <th>
103 <label for="logtivity_should_store_ip">Store Users IP Address</label>
104 <?php if (has_filter('logtivity_should_store_ip')): ?>
105 <div class="logtivity-constant">This option has been set in code.</div>
106 <?php endif ?>
107 </th>
108 <td>
109 <input type="hidden" name="logtivity_should_store_ip" id="logtivity_should_store_ip" value="0">
110
111 <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' : ''); ?>>
112 </td>
113 <td>
114 <span class="description">If you check this box, when logging an action, we will include the users IP address in the logged action.</span>
115 </td>
116 </tr>
117 <tr class="user-user-login-wrap">
118 <th>
119 <label for="logtivity_enable_debug_mode">Enable debug mode (recommended off by default)</label>
120 <?php if (has_filter('logtivity_enable_debug_mode')): ?>
121 <div class="logtivity-constant">This option has been set in code.</div>
122 <?php endif ?>
123 </th>
124 <td>
125 <input type="hidden" name="logtivity_enable_debug_mode" id="logtivity_enable_debug_mode" value="0">
126
127 <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' : ''); ?>>
128 </td>
129 <td>
130 <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>
131 </td>
132 </tr>
133 <tr class="user-user-login-wrap">
134 <th>
135 <label for="logtivity_disable_individual_logs">Disable Individual Logs</label>
136 <?php if (has_filter('logtivity_disable_individual_logs')): ?>
137 <div class="logtivity-constant">This option has been set in code.</div>
138 <?php endif ?>
139 </th>
140 <td>
141 <textarea style="width: 100%;" rows="10" <?php echo ( has_filter('logtivity_disable_individual_logs') ? 'readonly' : ''); ?> name="logtivity_disable_individual_logs" id="logtivity_disable_individual_logs" class="regular-checkbox" placeholder="User Logged In&#10;User Created && subscriber"><?php echo esc_html($options['logtivity_disable_individual_logs']); ?></textarea>
142 </td>
143 <td>
144 <span class="description">
145 You can disable individual logged actions here by listing the action names, one per line.
146
147 <br> <br>
148
149 To specify the context field as well, separate the action and context keywords with an && symbol.
150 </span>
151 </td>
152 </tr>
153 </tbody>
154 </table>
155
156 <p class="submit">
157 <input type="submit" name="submit" id="submit" class="button button-primary" value="Update Settings">
158 </p>
159
160 </form>
161
162 </div>
163 </div>
164
165 <?php if (absint( $options['logtivity_enable_debug_mode'] )): ?>
166
167 <div class="postbox">
168 <div class="inside">
169
170 <h3>Latest Response</h3>
171
172 <?php if ($latest_response = $options['logtivity_latest_response']): ?>
173
174 <h4>Date: <?php echo sanitize_text_field($latest_response['date']); ?></h4>
175
176 <?php if ($latest_response['response']): ?>
177 <code style="display: block; padding: 20px;">
178
179 <?php echo sanitize_text_field($latest_response['response']); ?>
180
181 </code>
182 <?php endif ?>
183
184 <?php else: ?>
185
186 <p>The latest logging response will appear here after an event has been logged.</p>
187
188 <?php endif ?>
189
190 </div>
191 </div>
192
193 <?php endif ?>
194
195 <?php echo logtivity_view('_admin-footer', compact('options')); ?>