post_locked_dialog WordPress Action Hook

If a user attempts to edit a post that is locked by another user, they will be presented with a dialog asking if they would like to take over the post. If the user elects to take over the post, they will be able to edit it and save their changes.

do_action( 'post_locked_dialog', WP_Post $post, WP_User $user ) #

Fires inside the post locked dialog before the buttons are displayed.


Parameters

$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
5.4.0The $user parameter was added.
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