stream icon indicating copy to clipboard operation
stream copied to clipboard

Exclude Action Scheduler post and comment types

Open lkraav opened this issue 6 years ago • 2 comments
trafficstars

Now that AS is part of WooCommerce, its usage surface rises rapidly.

This machine processing posts are all getting logged by Stream, highly likely creating a huge amount of noise.

I would propose to exclude them from processing as the shipped default.

add_filter( 'wp_stream_posts_exclude_post_types', function( $post_types ) {
        $post_types[] = 'scheduled-action';

        return $post_types;
} );

add_filter( 'wp_stream_comments_exclude_comment_types', function( $comment_types ) {
        $comment_types[] = 'action_log';

        return $comment_types;
} );

Your thoughts @lukecarbis?

lkraav avatar May 11 '19 10:05 lkraav

I would still do this @kasparsd :point_up: Action Scheduler files a ton of utility comments

lkraav avatar Apr 16 '20 14:04 lkraav

Sounds good to me @lkraav! Is there an existing place to add these? Could we check for the presence of AS before adding these filters just to make sure we're not excluding some custom post types with the same name?

kasparsd avatar Apr 16 '20 15:04 kasparsd