Adds a filter to allow custom control of who gets to revisionize#6
Adds a filter to allow custom control of who gets to revisionize#6jamiechong merged 2 commits intojamiechong:masterfrom
Conversation
jamiechong
left a comment
There was a problem hiding this comment.
@ryanshoover Have you tested this in your own dev setup? is_create_enabled is used twice: to add the "Revisionize" link, and again as a check before actually creating a revision. However in Revisionize\create, I also check if user_can_revisionize().
So I think we need to add a filter to this method as well. And for completeness, a filter for user_can_publish_revision might be handy.
Let me know if your testing deems your existing changes sufficient (I don't see how it could work, however). Otherwise, please make those further additions and we can get this stuff merged!
Thanks for your contributions - much appreciated!
|
Thanks for the feedback! In my testing, the one filter was sufficient, but the user role has the |
Right now, only those who can
edit_published_postscan make a revision of an existing post. There seems to be a need to allow more granular control. For instance, I may want users to be able to make edits to an existing page but not actually publish those changes until they've been reviewed by someone higher up the food chain.This PR adds a filter to the plugin to allow the end site to override the ability to revisionize a post.
Example usage:
The PR also does a bit of cleanup.