Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostType exclude filter #132

Open
hadronix opened this issue Jul 13, 2019 · 1 comment
Open

PostType exclude filter #132

hadronix opened this issue Jul 13, 2019 · 1 comment

Comments

@hadronix
Copy link

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.)

@hadronix hadronix changed the title CPT Filter PostType exclude filter Jul 13, 2019
@Abdipour
Copy link

Abdipour commented Mar 2, 2022

+1
Is there any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants