override_post_lock WordPress Filter Hook

The override_post_lock WordPress hook is used to override the locking mechanism for a specific post type. This can be useful for custom post types where you want to allow multiple authors to edit the same post.

apply_filters( 'override_post_lock', bool $override, WP_Post $post, WP_User $user ) #

Filters whether to allow the post lock to be overridden.


Description

Returning false from the filter will disable the ability to override the post lock.


Top ↑

Parameters

$override

(bool)Whether to allow the post lock to be overridden. Default true.

$post

(WP_Post)Post object.

$user

(WP_User)The user with the lock for the post.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More