show_post_locked_dialog
Filter HookDescription
Filters whether to show the post locked dialog. Returning false from the filter will prevent the dialog from being displayed.Hook Information
File Location |
wp-admin/includes/post.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1809 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$display
|
Whether to display the dialog. Default true. |
WP_Post
|
$post
|
Post object. |
WP_User
|
$user
|
The user with the lock for the post. |
Usage Examples
Basic Usage
<?php
// Hook into show_post_locked_dialog
add_filter('show_post_locked_dialog', 'my_custom_filter', 10, 3);
function my_custom_filter($display, $post, $user) {
// Your custom filtering logic here
return $display;
}
Source Code Context
wp-admin/includes/post.php:1809
- How this hook is used in WordPress core
<?php
1804 *
1805 * @param bool $display Whether to display the dialog. Default true.
1806 * @param WP_Post $post Post object.
1807 * @param WP_User $user The user with the lock for the post.
1808 */
1809 if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) {
1810 return;
1811 }
1812
1813 $locked = true;
1814 } else {
PHP Documentation
<?php
/**
* Filters whether to show the post locked dialog.
*
* Returning false from the filter will prevent the dialog from being displayed.
*
* @since 3.6.0
*
* @param bool $display Whether to display the dialog. Default true.
* @param WP_Post $post Post object.
* @param WP_User $user The user with the lock for the post.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.