Support » Plugin: Simple History » Hide plugin updates

  • Resolved wwwwwwoi

    (@dldufrnfu)


    Hello,
    I’m new to this plug-in and was trying to display only updates on post/page.
    I found this filter on repo, but this didn’t seem to work for me:

    
    // Do not log some post types, for example pages and attachments in this case
    add_filter('simple_history/log/do_log', function ($do_log = null, $level = null, $message = null, $context = null, $logger = null) {
        $post_types_to_not_log = array(
            'plugin'
        );
        if (( isset($logger->slug) && ($logger->slug === 'SimplePostLogger' || $logger->slug === 'SimpleMediaLogger') ) && ( isset($context['post_type']) && in_array($context['post_type'], $post_types_to_not_log) )) {
            $do_log = false;
        }
        return $do_log;
    }, 10, 5);

    I pasted this code in functions.php, but I was still able to see the updates info on plugins. Does this only work with post type?
    Is there way to disable plugins, wordpress core, etc from being updated in the view?

    • This topic was modified 3 months, 3 weeks ago by wwwwwwoi.
Viewing 1 replies (of 1 total)
  • Sorry I should’ve done more deep reading of examples.php
    Found the filter to load only specific loggers.

    Thanks!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.