PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | modules/logs/classes/class-log-settings.php +12 -5 6.1.4 → 6.2.2 View file →
@@ -295,9 +295,9 @@
295 295 <div class="ten wide column ui toggle checkbox mainwp-checkbox-showhide-elements" hide-parent="auto-archive;child-logs-ttl">
296 296 <input type="checkbox" class="settings-field-value-change-handler" name="mainwp_module_log_enabled" id="mainwp_module_log_enabled" <?php echo $enabled ? 'checked="true"' : ''; ?> /><label></label>
297 297 </div>
298 298 </div>
299 - <div class="ui grid field">
299 + <div class="ui grid field" id="field-log-enable-auto-archive">
300 300 <label class="six wide column middle aligned"><?php esc_html_e( 'Automatically archive logs', 'mainwp' ); ?></label>
301 301 <div class="ten wide column ui toggle checkbox mainwp-checkbox-showhide-elements" hide-parent="auto-archive" data-tooltip="<?php esc_attr_e( 'Automatically move older logs to the archive after a specified period of time. This helps keep your active logs organized while maintaining a searchable history.', 'mainwp' ); ?>" data-inverted="" data-position="bottom left">
302 302 <input type="checkbox" name="mainwp_module_log_enable_auto_archive" id="mainwp_module_log_enable_auto_archive" <?php echo $enabled_auto_archive ? 'checked="true"' : ''; ?> /><label></label>
303 303 </div>
@@ -367,11 +367,18 @@
367 367 if ( ! is_array( static::$enable_logs_items ) ) {
368 368 static::$enable_logs_items = array();
369 369 }
370 370
371 - if ( ! isset( static::$enable_logs_items['changeslogs'] ) ) {
372 - static::$enable_logs_items['changeslogs'] = array_fill_keys( static::get_disabled_changes_logs_default_settings(), 0 );
373 - }
371 + $default_disabled_changeslogs = array_fill_keys(
372 + static::get_disabled_changes_logs_default_settings(),
373 + 0
374 + );
375 +
376 + static::$enable_logs_items['changeslogs'] = array_replace(
377 + $default_disabled_changeslogs,
378 + static::$enable_logs_items['changeslogs'] ?? array()
379 + );
380 +
374 381 }
375 382 return static::$enable_logs_items;
376 383 }
377 384
@@ -380,9 +387,9 @@
380 387 *
381 388 * @return array Disalbed default.
382 389 */
383 390 public static function get_disabled_changes_logs_default_settings() {
384 - return array( 1925, 1930, 1935, 1940, 1945, 1950, 1955 );
391 + return array( 1310, 1315, 1680, 1925, 1930, 1935, 1940, 1945, 1950, 1955 );
385 392 }
386 393
387 394 /**
388 395 * Method is_action_log_enabled().