• Resolved Pieter Hartsook

    (@hartsook)


    I really only want to see what logged in users (my clients) are doing on their website like editing a page or post. But 90% of the logs are xyz plugin has an update, updated xyz plugin, etc.

    What is the appropriate way to only log post or page content changes? These would necessarily be made by logged in users.

    Thanks,

    Pieter

Viewing 1 replies (of 1 total)
  • Plugin Author P?r Thernstr?m

    (@eskapism)

    You can control what to log using filters. The example code below only loads the post logger, I think that should suit your needs. Paste the code in your functions.php or similar.

    
    /**
     * Load only the loggers that are specified in the $do_log_us array
     */
    add_filter('simple_history/logger/load_logger', function ($load_logger, $logger_basename) {
    
        $load_logger = false;
        $do_log_us = array( 'SimplePostLogger' );
    
        if (in_array($logger_basename, $do_log_us)) {
            $load_logger = true;
        }
    
        return $load_logger;
    }, 10, 2);
    

    See the examples file for more examples:
    https://github.com/bonny/WordPress-Simple-History/blob/master/examples/examples.php

Viewing 1 replies (of 1 total)
  • The topic ‘I don’t want to track plugin and theme updates, how not to log those’ is closed to new replies.