Plugin Directory

Changeset 2741443


Ignore:
Timestamp:
06/13/2022 08:58:00 AM (4 years ago)
Author:
logtivity
Message:

Release 1.18.0

Location:
logtivity
Files:
58 added
5 edited

Legend:

Unmodified
Added
Removed
  • logtivity/trunk/Logs/Core/Logtivity_Core.php

    r2584302 r2741443  
    1010        add_action('init', [$this, 'maybeSettingsUpdated']);
    1111        add_action( 'permalink_structure_changed', [$this, 'permalinksUpdated'], 10, 2);
     12        add_action( 'update_option', [$this, 'optionUpdated'], 10, 3);
     13
    1214        // do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
    1315    }
     
    7678    }
    7779
     80    public function optionUpdated($option, $old_value, $value)
     81    {
     82        if (!is_admin() || $old_value == $value) {
     83            return;
     84        }
     85
     86        $ignore = [
     87            'cron',
     88            'action_scheduler_lock_async-request-runner',
     89            'wp_all_export_pro_addons_not_included',
     90            'logtivity_latest_response',
     91            'logtivity_api_key_check',
     92            'logtivity_url_hash',
     93            'logtivity_global_disabled_logs',
     94            'logtivity_enable_white_label_mode',
     95            'recently_activated',
     96            'active_plugins',
     97            'jp_sync_last_success_sync',
     98            'jetpack_sync_settings_dedicated_sync_enabled',
     99            'jetpack_plugin_api_action_links',
     100            'stats_cache',
     101            'admin_email_lifespan',
     102            'db_upgraded',
     103            'delete_blog_hash',
     104            'adminhash',
     105            'auto_plugin_theme_update_emails',
     106            '_wp_suggested_policy_text_has_changed',
     107            'ftp_credentials',
     108            'uninstall_plugins',
     109            'wp_force_deactivated_plugins',
     110            'fresh_site',
     111            'allowedthemes',
     112            'rxpp_blocked_methods_count',
     113            'wordfence_syncAttackDataAttempts',
     114            'akismet_spam_count',
     115            'jetpack_next_sync_time_sync',
     116            'jetpack_updates_sync_checksum',
     117        ];
     118
     119        if (in_array($option, $ignore)) {
     120            return;
     121        }
     122
     123        $wildcardIgnores = [
     124            'transient',
     125            'cache',
     126            'auto_updater',
     127            'frm_addons',
     128            'wpe',
     129            'edd_api',
     130            'edd_sl',
     131        ];
     132
     133        foreach ($wildcardIgnores as $wildcard) {
     134            if (strpos($option, $wildcard) !== false) {
     135                return;
     136            }
     137        }
     138
     139        Logtivity::log()
     140            ->setAction('Option Updated')
     141            ->setContext($option)
     142            ->addMeta('Old Value', $old_value)
     143            ->addMeta('New Value', $value)
     144            ->send();
     145    }
     146
    78147    public function permalinksUpdated($old_permalink_structure, $permalink_structure)
    79148    {
  • logtivity/trunk/Services/Logtivity_Check_For_Disabled_Individual_Logs.php

    r2723235 r2741443  
    4545    }
    4646
    47     private function matches($keyword1, $disabledKeyword)
     47    private function matches($keyword, $disabledKeyword)
    4848    {
    49         $disabledKeyword = trim($disabledKeyword);
     49        $keyword = trim(strtolower($keyword));
     50        $disabledKeyword = trim(strtolower($disabledKeyword));
    5051
    5152        if ($disabledKeyword === '*') {
    5253            return true;
    5354        }
     55
     56        if (strpos($disabledKeyword, '*') !== false) {
     57            return strpos($keyword, str_replace('*', '', $disabledKeyword)) !== false;
     58        }
    5459       
    55         return strtolower(trim($keyword1)) == strtolower($disabledKeyword);
     60        return $keyword == $disabledKeyword;
    5661    }
    5762
  • logtivity/trunk/logtivity.php

    r2737295 r2741443  
    55 * Plugin URI:  https://logtivity.io
    66 * Description: Dedicated Event Monitoring for WordPress using Logtivity.io.
    7  * Version:     1.17.1
     7 * Version:     1.18.0
    88 * Author:      Logtivity
    99 * Text Domain: logtivity
     
    1212class Logtivity
    1313{
    14     protected $version = '1.17.1';
     14    protected $version = '1.18.0';
    1515
    1616    /**
  • logtivity/trunk/readme.md

    r2737295 r2741443  
    55Requires at least: 4.7
    66Tested up to: 5.9
    7 Stable tag: 1.17.1
     7Stable tag: 1.18.0
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.18.0 =
     282
     283_Release Date – Monday 13th June 2022_
     284
     285* Add logging of Option Updates.
     286* Allow wildcards when disabling specific logs.
     287
    281288= 1.17.1 =
    282289
  • logtivity/trunk/readme.txt

    r2737295 r2741443  
    55Requires at least: 4.7
    66Tested up to: 5.9
    7 Stable tag: 1.17.1
     7Stable tag: 1.18.0
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    279279== Changelog ==
    280280
     281= 1.18.0 =
     282
     283_Release Date – Monday 13th June 2022_
     284
     285* Add logging of Option Updates.
     286* Allow wildcards when disabling specific logs.
     287
    281288= 1.17.1 =
    282289
Note: See TracChangeset for help on using the changeset viewer.