• Resolved conradish

    (@conradish)


    Hi,

    This plugin sounds perfect, maybe I’ve missed something, but is it possible to lock/protect the post even for admin (i.e. admin would have to unlock/unprotect it before editing or deleting) or are admins always able to edit/delete?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author andyexeter

    (@andyexeter)

    Hey conradish,

    That functionality doesn’t currently exist in the plugin I’m afraid.

    It sounds like a good idea for a feature toggle though, so I’ll look at implementing it when I get some free time and will update this thread when it has been released ??

    Plugin Author andyexeter

    (@andyexeter)

    Hey conradish,

    I just had a thought on this that should get the plugin working the way you want it without the need for an update.

    By default, the plugin checks if the user has the manage_options capability to decide whether that user can edit a locked post or delete a protected post. You can filter that capability and use pretty much anything so no users have it.

    Something like this should work:

    
    add_filter('postlockdown_admin_capability', function() {
        return 'conradish_super_fake_capability';
    });
    

    Obviously you could change the capability to anything you wanted, it just needs to be something that admin users don’t have.

    Let me know how you get on!

    Thanks, Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible to lock/protect for admin too?’ is closed to new replies.