PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 1.0
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v1.0
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 1.6.1 All 66 releases
logtivity / views / admin.php

admin.php in Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity 1.0, at views/admin.php

115 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <h1>Logtivity.io</h1>
2
3 <form action="<?php echo admin_url( 'admin-ajax.php' ); ?>?action=logtivity_update_settings" method="post">
4
5 <?php wp_nonce_field( 'logtivity_update_settings', 'logtivity_update_settings' ) ?>
6
7 <table class="form-table">
8 <tbody>
9 <tr class="user-user-login-wrap">
10 <th><label for="logtivity_site_api_key">Site API Key</label></th>
11 <td>
12 <input 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">
13 </td>
14 <td>
15 <span class="description">You can find this value by logging into your account and navigating to/creating this site settings page.</span>
16 </td>
17 </tr>
18 <tr class="user-user-login-wrap">
19 <th><label for="logtivity_disable_default_logging">Disable built in Event Logging.</label></th>
20 <td>
21 <input type="hidden" name="logtivity_disable_default_logging" id="logtivity_disable_default_logging" value="0">
22
23 <input 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' : ''); ?>>
24 </td>
25 <td>
26 <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>
27 </td>
28 </tr>
29 <tr class="user-user-login-wrap">
30 <th><label for="logtivity_should_store_user_id">Store User ID</label></th>
31 <td>
32 <input type="hidden" name="logtivity_should_store_user_id" id="logtivity_should_store_user_id" value="0">
33
34 <input 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' : ''); ?>>
35 </td>
36 <td>
37 <span class="description">If you check this box, when logging an action, we will include the users User ID in the logged action.</span>
38 </td>
39 </tr>
40 <tr class="user-user-login-wrap">
41 <th><label for="logtivity_should_log_profile_link">Store Users Profile Link</label></th>
42 <td>
43 <input type="hidden" name="logtivity_should_log_profile_link" id="logtivity_should_log_profile_link" value="0">
44
45 <input 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' : ''); ?>>
46 </td>
47 <td>
48 <span class="description">If you check this box, when logging an action, we will include the users profile link in the logged action.</span>
49 </td>
50 </tr>
51 <tr class="user-user-login-wrap">
52 <th><label for="logtivity_should_log_username">Store Users Username</label></th>
53 <td>
54 <input type="hidden" name="logtivity_should_log_username" id="logtivity_should_log_username" value="0">
55
56 <input 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' : ''); ?>>
57 </td>
58 <td>
59 <span class="description">If you check this box, when logging an action, we will include the users username in the logged action.</span>
60 </td>
61 </tr>
62 <tr class="user-user-login-wrap">
63 <th><label for="logtivity_should_store_ip">Store Users IP Address</label></th>
64 <td>
65 <input type="hidden" name="logtivity_should_store_ip" id="logtivity_should_store_ip" value="0">
66
67 <input 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' : ''); ?>>
68 </td>
69 <td>
70 <span class="description">If you check this box, when logging an action, we will include the users IP address in the logged action.</span>
71 </td>
72 </tr>
73 <tr class="user-user-login-wrap">
74 <th><label for="logtivity_enable_debug_mode">Enable debug mode (recommended off by default)</label></th>
75 <td>
76 <input type="hidden" name="logtivity_enable_debug_mode" id="logtivity_enable_debug_mode" value="0">
77
78 <input 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' : ''); ?>>
79 </td>
80 <td>
81 <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>
82 </td>
83 </tr>
84 </tbody>
85 </table>
86
87 <p class="submit">
88 <input type="submit" name="submit" id="submit" class="button button-primary" value="Update Settings">
89 </p>
90
91 </form>
92
93 <?php if (absint( $options['logtivity_enable_debug_mode'] )): ?>
94
95 <h3>Latest Response</h3>
96
97 <?php if ($latest_response = $options['logtivity_latest_response']): ?>
98
99 <h4>Date: <?php echo sanitize_text_field($latest_response['date']); ?></h4>
100
101 <?php if ($latest_response['response']): ?>
102 <code style="display: block; padding: 20px;">
103
104 <?php echo sanitize_text_field($latest_response['response']); ?>
105
106 </code>
107 <?php endif ?>
108
109 <?php else: ?>
110
111 <p>The latest logging response will appear here after an event has been logged.</p>
112
113 <?php endif ?>
114
115 <?php endif ?>