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

Verify post type before executing delete #169

Conversation

soup-bowl
Copy link
Owner

Seems like in some unfortunate scenarios, the loop before a deletion can end up with some posts that escape the search results. This change adds a check of valid post type before running a deletion.

To be absolutely sure, I've also added the check to all instances of wp_delete_post. Should be fine in the other scenarios, but this was fine... I don't want to leave it to chance.

@soup-bowl soup-bowl self-assigned this Jul 14, 2024
@soup-bowl soup-bowl linked an issue Jul 14, 2024 that may be closed by this pull request
@soup-bowl soup-bowl added the bug Something isn't working label Jul 14, 2024
@soup-bowl soup-bowl merged commit 4bb86da into develop Jul 21, 2024
6 checks passed
@soup-bowl soup-bowl deleted the 168-logserviceprune_logs-removes-old-posts-from-custom-post-type branch July 21, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LogService::prune_logs removes old posts from custom post type
1 participant