Editor: Fix undefined $locked var in edit-form-blocks.php when the show_post_locked_dialog filter is used to disable displaying of the dialog.

Props aprea.
Fixes #47604.

git-svn-id: https://develop.svn.wordpress.org/trunk@45564 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2019-06-25 15:02:34 +00:00
parent 725c77a13d
commit ec44c57afa

View File

@ -226,6 +226,8 @@ foreach ( $image_size_names as $image_size_slug => $image_size_name ) {
// Lock settings.
$user_id = wp_check_post_lock( $post->ID );
if ( $user_id ) {
$locked = false;
/** This filter is documented in wp-admin/includes/post.php */
if ( apply_filters( 'show_post_locked_dialog', true, $post, $user_id ) ) {
$locked = true;