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

175 lines 8.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 </tbody>
134 </table>
135
136 <p class="submit">
137 <input type="submit" name="submit" id="submit" class="button button-primary" value="Update Settings">
138 </p>
139
140 </form>
141
142 </div>
143 </div>
144
145 <?php if (absint( $options['logtivity_enable_debug_mode'] )): ?>
146
147 <div class="postbox">
148 <div class="inside">
149
150 <h3>Latest Response</h3>
151
152 <?php if ($latest_response = $options['logtivity_latest_response']): ?>
153
154 <h4>Date: <?php echo sanitize_text_field($latest_response['date']); ?></h4>
155
156 <?php if ($latest_response['response']): ?>
157 <code style="display: block; padding: 20px;">
158
159 <?php echo sanitize_text_field($latest_response['response']); ?>
160
161 </code>
162 <?php endif ?>
163
164 <?php else: ?>
165
166 <p>The latest logging response will appear here after an event has been logged.</p>
167
168 <?php endif ?>
169
170 </div>
171 </div>
172
173 <?php endif ?>
174
175 <?php echo logtivity_view('_admin-footer', compact('options')); ?>