Skip to content

Protect document revisions from deletions by database cleaner plugins using WordPress APIs#365

Merged
NeilWJames merged 12 commits intowp-document-revisions:mainfrom
NeilWJames:main
Jun 9, 2025
Merged

Protect document revisions from deletions by database cleaner plugins using WordPress APIs#365
NeilWJames merged 12 commits intowp-document-revisions:mainfrom
NeilWJames:main

Conversation

@NeilWJames
Copy link
Copy Markdown
Collaborator

Addresses #364

Whilst it seems to be only a subset of database cleaners, it will stop some users having a nasty surprise.

@NeilWJames NeilWJames requested a review from benbalter May 28, 2025 10:49
@codecov-commenter

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

@benbalter benbalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks!

@NeilWJames
Copy link
Copy Markdown
Collaborator Author

@benbalter,
Thank you for this. I am currently working on an integration plugin with PP Revisions to be put into the CookBook and to close the issue here.

I realised that this is an external plugin that should be able to delete revisions. So I need to add a filter into this code to enable "trusted" plugins to do this.

I won't be able return the code right now and will be away from my computer for about a week. I'll make the necessary changes then and complete this PR.

Neil

@NeilWJames
Copy link
Copy Markdown
Collaborator Author

Filter added since initial PR to allow specific (user-defined) plugins to delete document revisions.

Documentation files updated and ReadMe regenerated.

@NeilWJames NeilWJames merged commit 7968776 into wp-document-revisions:main Jun 9, 2025
9 checks passed
NeilWJames added a commit to NeilWJames/wp-document-revisions that referenced this pull request Jun 9, 2025
Merge pull request wp-document-revisions#365 from wp-document-revisions/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants