• My goal is to “protect” Admin users from accidentally editing/deleting a page that is set to LOCK. They would be aware that if a page is set to “Lock,” they should not be editing/deleting that page because of the ALERT that displays from your plugin.

    So I would like to have the “WP capability” input to include Admin users for the lock – BUT – they would also have the ability to LOCK/UNLOCK.

    Also, for a future version, for sites with a ton of pages/posts … along with “Lock only specified pages,” it would be nice to have “Lock all pages except: …” to allow for a more convenient method of only having to enter the excluded pages.

    Thanks.

    https://www.ads-software.com/plugins/lock-pages/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steve Taylor

    (@gyrus)

    Hi there,

    I’ve applied the first change you’ve suggested by adding a ‘protect from all’ setting. It default to off – if it’s set to on, the locking will apply even if you have the capability to manage locking. (Obviously you’ll still be able to lock / unlock.) Please download this version and test it out, let me know if it works OK for you…

    https://github.com/gyrus/Lock-Pages/archive/77cec216716bd0d39576f9d9336fea563b28b218.zip

    I’m looking into the other suggestion. One issue is that at the moment, the ‘scope’ option to set whether you lock all pages or only specified pages only applies to *pages*. This is partly an overhang from the plugin’s origins as only applying to pages anyway. Applying locking to CPTs was recently introduced, and obviously I decided to not extend this flexibility to CPTs. So no CPTs are locked unless specifically locked.

    It would be easy to introduce a ‘lock all pages except’ scope, if we kept the scope to pages only. I think if we wanted to extend this scope option to CPTs, it would need to be set for every CPT.

    If you only need this for pages, that makes it easy – what do you think?

    Plugin Author Steve Taylor

    (@gyrus)

    Hi there,

    I’ve created a version that has an option to lock all pages except those specified. Please download from GitHub:

    https://github.com/gyrus/Lock-Pages/archive/lock-all-except.zip

    I’d really appreciate it if you could help test this! Let me know how it works for you, hopefully I can release this as a new version soon.

    Cheers,

    Steve

    Plugin Author Steve Taylor

    (@gyrus)

    One oversight in this feature might be creating new pages. If you’ve set all pages to be locked except ones specified, if editors create new pages, they’re immediately locked. Doesn’t sound like a good situation to me. Perhaps if the ‘except’ option is set, users who don’t have the required permission to edit locked pages can’t create pages either?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set LOCK for Admin?’ is closed to new replies.