From ec44c57afae755665575ac4f151de64067550167 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 25 Jun 2019 15:02:34 +0000 Subject: [PATCH] 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 --- src/wp-admin/edit-form-blocks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 29bf93e80e..373a6b3cc4 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -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;