show_post_locked_dialog filter-hookWP 3.6.0

Filters whether to show the post locked dialog.

Returning false from the filter will prevent the dialog from being displayed.

Usage

add_filter( 'show_post_locked_dialog', 'wp_kama_show_post_locked_dialog_filter', 10, 3 );

/**
 * Function for `show_post_locked_dialog` filter-hook.
 * 
 * @param bool    $display Whether to display the dialog.
 * @param WP_Post $post    Post object.
 * @param WP_User $user    The user with the lock for the post.
 *
 * @return bool
 */
function wp_kama_show_post_locked_dialog_filter( $display, $post, $user ){

	// filter...
	return $display;
}
$display(true|false)
Whether to display the dialog.
Default: true
$post(WP_Post)
Post object.
$user(WP_User)
The user with the lock for the post.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

_admin_notice_post_locked()
show_post_locked_dialog
wp-admin/includes/post.php 1796
if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) {
wp-admin/edit-form-blocks.php 151
if ( apply_filters( 'show_post_locked_dialog', true, $post, $user_id ) ) {

Where the hook is used in WordPress

Usage not found.