1

I want to disable revision access for a specific user role.

I saw the code posted here: Enable/disable post revisions programmatically but am worried that even with a clause to check the current admin users role that this code would disable the revision access site wide, not just to that specific user in that specific moment.

Has anyone done this?

1

I resolved this in the end by removing access to the revisions meta box for certain user types...

if (get_current_user_role()=="custom_user_role"){
function my_remove_revisions() {
    remove_meta_box('revisionsdiv', 'apartments', 'normal');
}
  add_action( 'admin_menu', 'my_remove_revisions' );
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.