Skip to content

PostType exclude filter #132

@hadronix

Description

@hadronix

hey,

really great plugin, it would be to nice filter custom post types in hooks_transition_post_status and hooks_delete_post. Right now, you're testing for the nav_menu_item to ignore, i would change this to:

$excludes = apply_filters( 'aal_hooks_post_status_excludes', [ 'nav_menu_item'] );
// Skip for menu items.
if ( in_array( get_post_type( $post->ID ), $excludes ) )
     return;

(alternativ you could create an options section to enable/disable the post types for logging.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions