Changeset 2861741
- Timestamp:
- 02/07/2023 10:27:31 PM (3 years ago)
- Location:
- logtivity
- Files:
-
- 68 added
- 8 edited
-
tags/2.2.0 (added)
-
tags/2.2.0/.gitignore (added)
-
tags/2.2.0/Admin (added)
-
tags/2.2.0/Admin/Logtivity_Admin.php (added)
-
tags/2.2.0/Admin/Logtivity_Dismiss_Notice_Controller.php (added)
-
tags/2.2.0/Admin/Logtivity_Log_Index_Controller.php (added)
-
tags/2.2.0/Admin/Logtivity_Options.php (added)
-
tags/2.2.0/Errors (added)
-
tags/2.2.0/Errors/Logtivity_Error_Log.php (added)
-
tags/2.2.0/Errors/Logtivity_Error_Logger.php (added)
-
tags/2.2.0/Errors/Logtivity_Stack_Trace.php (added)
-
tags/2.2.0/Errors/Logtivity_Stack_Trace_Snippet.php (added)
-
tags/2.2.0/Helpers (added)
-
tags/2.2.0/Helpers/Helpers.php (added)
-
tags/2.2.0/Helpers/Logtivity_Log_Global_Function.php (added)
-
tags/2.2.0/Helpers/Logtivity_Wp_User.php (added)
-
tags/2.2.0/Logs (added)
-
tags/2.2.0/Logs/Code_Snippets (added)
-
tags/2.2.0/Logs/Code_Snippets/Logtivity_Code_Snippets.php (added)
-
tags/2.2.0/Logs/Core (added)
-
tags/2.2.0/Logs/Core/Logtivity_Comment.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Core.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Meta.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Plugin.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Post.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Term.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_Theme.php (added)
-
tags/2.2.0/Logs/Core/Logtivity_User.php (added)
-
tags/2.2.0/Logs/Download_Monitor (added)
-
tags/2.2.0/Logs/Download_Monitor/Logtivity_Download_Monitor.php (added)
-
tags/2.2.0/Logs/Easy_Digital_Downloads (added)
-
tags/2.2.0/Logs/Easy_Digital_Downloads/Logtivity_Abstract_Easy_Digital_Downloads.php (added)
-
tags/2.2.0/Logs/Easy_Digital_Downloads/Logtivity_Easy_Digital_Downloads.php (added)
-
tags/2.2.0/Logs/Easy_Digital_Downloads/Logtivity_Easy_Digital_Downloads_Recurring.php (added)
-
tags/2.2.0/Logs/Easy_Digital_Downloads/Logtivity_Easy_Digital_Downloads_Software_Licensing.php (added)
-
tags/2.2.0/Logs/Formidable (added)
-
tags/2.2.0/Logs/Formidable/Logtivity_Formidable.php (added)
-
tags/2.2.0/Logs/Formidable/Logtivity_FrmEntryFormatter.php (added)
-
tags/2.2.0/Logs/Logtivity_Abstract_Logger.php (added)
-
tags/2.2.0/Logs/Memberpress (added)
-
tags/2.2.0/Logs/Memberpress/Logtivity_Memberpress.php (added)
-
tags/2.2.0/Logs/WP_All_Import (added)
-
tags/2.2.0/Logs/WP_All_Import/Logtivity_WP_All_Import.php (added)
-
tags/2.2.0/Services (added)
-
tags/2.2.0/Services/Logtivity_Api.php (added)
-
tags/2.2.0/Services/Logtivity_Check_For_Disabled_Individual_Logs.php (added)
-
tags/2.2.0/Services/Logtivity_Check_For_New_Settings.php (added)
-
tags/2.2.0/Services/Logtivity_Logger.php (added)
-
tags/2.2.0/Services/Logtivity_Register_Site.php (added)
-
tags/2.2.0/Services/Logtivity_User_Logger_Trait.php (added)
-
tags/2.2.0/assets (added)
-
tags/2.2.0/assets/admin.css (added)
-
tags/2.2.0/assets/app.js (added)
-
tags/2.2.0/assets/logtivity-logo.svg (added)
-
tags/2.2.0/logtivity.php (added)
-
tags/2.2.0/readme.md (added)
-
tags/2.2.0/readme.txt (added)
-
tags/2.2.0/views (added)
-
tags/2.2.0/views/_admin-footer.php (added)
-
tags/2.2.0/views/_admin-header.php (added)
-
tags/2.2.0/views/_admin-sidebar.php (added)
-
tags/2.2.0/views/_log-show.php (added)
-
tags/2.2.0/views/_logs-loop.php (added)
-
tags/2.2.0/views/activation.php (added)
-
tags/2.2.0/views/log-index.php (added)
-
tags/2.2.0/views/settings.php (added)
-
tags/2.2.0/views/site-url-changed-notice.php (added)
-
trunk/Admin/Logtivity_Options.php (modified) (2 diffs)
-
trunk/Logs/Core/Logtivity_Core.php (modified) (3 diffs)
-
trunk/Logs/Core/Logtivity_Meta.php (modified) (1 diff)
-
trunk/Services/Logtivity_Api.php (modified) (1 diff)
-
trunk/Services/Logtivity_Check_For_New_Settings.php (added)
-
trunk/logtivity.php (modified) (5 diffs)
-
trunk/readme.md (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
logtivity/trunk/Admin/Logtivity_Options.php
r2829637 r2861741 11 11 'logtivity_site_api_key', 12 12 'logtivity_disable_default_logging', 13 'logtivity_enable_options_table_logging', 14 'logtivity_enable_post_meta_logging', 13 15 'logtivity_should_store_user_id', 14 16 'logtivity_should_store_ip', … … 155 157 } 156 158 157 /**158 * Is it time to check in with the latest API response incase of any new global settings?159 *160 * @return bool161 */162 159 public function shouldCheckInWithApi() 163 160 { 164 $latestReponse = $this->getOption('logtivity_latest_response');161 $latestReponse = get_option('logtivity_last_settings_check_in_at'); 165 162 166 163 if (is_array($latestReponse) && isset($latestReponse['date'])) { -
logtivity/trunk/Logs/Core/Logtivity_Core.php
r2829637 r2861741 102 102 'logtivity_disable_default_logging', 103 103 'logtivity_site_api_key', 104 'logtivity_last_settings_check_in_at', 105 'logtivity_enable_options_table_logging', 106 'logtivity_enable_post_meta_logging', 104 107 'recently_activated', 105 108 'active_plugins', … … 152 155 'edd_sl', 153 156 'frm_', 157 'queue', 158 'cron', 159 'sync', 160 'last_run', 154 161 ]; 155 162 … … 158 165 return; 159 166 } 167 } 168 169 $logtivity_enable_options_table_logging = get_option('logtivity_enable_options_table_logging'); 170 171 if ($logtivity_enable_options_table_logging === 0 || $logtivity_enable_options_table_logging === '0') { 172 return; 160 173 } 161 174 -
logtivity/trunk/Logs/Core/Logtivity_Meta.php
r2743367 r2861741 79 79 } 80 80 81 $logtivity_enable_post_meta_logging = get_option('logtivity_enable_post_meta_logging'); 82 83 if ($logtivity_enable_post_meta_logging === 0 || $logtivity_enable_post_meta_logging === '0') { 84 return; 85 } 86 81 87 return Logtivity_Logger::log() 82 88 ->setAction($this->getPostTypeLabel($object_id) . ' Meta '. $keyword) -
logtivity/trunk/Services/Logtivity_Api.php
r2829637 r2861741 124 124 ); 125 125 126 update_option('logtivity_last_settings_check_in_at', ['date' => date("Y-m-d H:i:s")]); 127 126 128 $body = json_decode($response, true); 127 129 128 if (isset($body['settings'])) { 129 $this->options->update([ 130 'logtivity_global_disabled_logs' => $body['settings']['disabled_logs'], 131 'logtivity_enable_white_label_mode' => $body['settings']['enable_white_label_mode'], 132 'logtivity_disabled_error_levels' => $body['settings']['disabled_error_levels'], 133 'logtivity_disable_error_logging' => $body['settings']['disable_error_logging'], 134 'logtivity_hide_plugin_from_ui' => $body['settings']['hide_plugin_from_ui'] ?? null, 135 // 'logtivity_disable_default_logging' => $body['settings']['disable_default_logging'], 136 ], 137 false 138 ); 139 } 130 $this->updateSettings($body); 140 131 } 141 132 142 133 return $response; 134 } 135 136 public function updateSettings($body) 137 { 138 if (isset($body['settings'])) { 139 $this->options->update([ 140 'logtivity_global_disabled_logs' => $body['settings']['disabled_logs'] ?? null, 141 'logtivity_enable_white_label_mode' => $body['settings']['enable_white_label_mode'] ?? null, 142 'logtivity_disabled_error_levels' => $body['settings']['disabled_error_levels'] ?? null, 143 'logtivity_disable_error_logging' => $body['settings']['disable_error_logging'] ?? null, 144 'logtivity_hide_plugin_from_ui' => $body['settings']['hide_plugin_from_ui'] ?? null, 145 'logtivity_disable_default_logging' => $body['settings']['disable_default_logging'] ?? null, 146 'logtivity_enable_options_table_logging' => $body['settings']['enable_options_table_logging'] ?? null, 147 'logtivity_enable_post_meta_logging' => $body['settings']['enable_post_meta_logging'] ?? null, 148 ], 149 false 150 ); 151 } 143 152 } 144 153 -
logtivity/trunk/logtivity.php
r2850788 r2861741 5 5 * Plugin URI: https://logtivity.io 6 6 * Description: Dedicated Event Monitoring for WordPress using Logtivity.io. 7 * Version: 2. 1.17 * Version: 2.2.0 8 8 * Author: Logtivity 9 9 * Text Domain: logtivity … … 12 12 class Logtivity 13 13 { 14 protected $version = '2. 1.1';14 protected $version = '2.2.0'; 15 15 16 16 /** … … 33 33 'Logs/Logtivity_Abstract_Logger', 34 34 'Services/Logtivity_Check_For_Disabled_Individual_Logs', 35 'Services/Logtivity_Check_For_New_Settings', 35 36 /** 36 37 * Error logging … … 143 144 144 145 add_action('plugins_loaded', function() { 146 if ($this->defaultLoggingDisabled()) { 147 return; 148 } 149 145 150 $this->maybeLoadLogClasses(); 146 151 … … 151 156 public function maybeLoadLogClasses() 152 157 { 153 if ($this->defaultLoggingDisabled()) {154 return;155 }156 157 158 foreach ($this->logClasses as $filePath) 158 159 { -
logtivity/trunk/readme.md
r2850788 r2861741 5 5 Requires at least: 4.7 6 6 Tested up to: 6.0 7 Stable tag: 2. 1.17 Stable tag: 2.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 262 262 263 263 == Changelog == 264 265 = 2.2.0 = 266 267 _Release Date – Tuesday 7th February 2023_ 268 269 * Add support for globally disabling default logs and enabling/disabling Options table and Post Meta changes. 264 270 265 271 = 2.1.1 = -
logtivity/trunk/readme.txt
r2850788 r2861741 5 5 Requires at least: 4.7 6 6 Tested up to: 6.0 7 Stable tag: 2. 1.17 Stable tag: 2.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 262 262 263 263 == Changelog == 264 265 = 2.2.0 = 266 267 _Release Date – Tuesday 7th February 2023_ 268 269 * Add support for globally disabling default logs and enabling/disabling Options table and Post Meta changes. 264 270 265 271 = 2.1.1 = -
logtivity/trunk/views/settings.php
r2805342 r2861741 35 35 </td> 36 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 37 <tr class="user-user-login-wrap"> 54 38 <th>
Note: See TracChangeset
for help on using the changeset viewer.