Digital Sovereignty for everyone

Hooks and filters

Filters

  • lh_post_locking_lock_capability: the capability needed to lock, unlock and edit a locked post. Default manage_options.
  • lh_post_locking_get_lockable_post_types: the array of post type names that can be locked.
  • lh_post_locking_bypass_lock: return true to let the current write to a locked post through. Receives false and the post ID. For legitimate background updaters; LH_Post_Locking_Plugin::run_bypassing_lock( $callback ) does the same for one callback.
  • lh_post_locking_is_frozen_meta_key: whether a meta key is frozen on a locked post. Receives the default (true for keys not starting with an underscore), the meta key and the post ID.
  • lh_post_locking_init_plugin: return false to stop the plugin loading.

Actions

  • lh_post_locking_post_locked: fires when a post is locked. Receives the post ID and the ID of the user who locked it.
  • lh_post_locking_post_unlocked: fires when a post is unlocked. Receives the post ID and the ID of the user who unlocked it.
  • lh_post_locking_write_refused: fires when the write-path backstop refuses a write to a locked post. Receives the post ID, the operation (update, trash, delete or meta) and the ID of the current user (0 when signed out).

All three actions suit an audit log.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.