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.
Built from https://develop.svn.wordpress.org/trunk@45564


git-svn-id: http://core.svn.wordpress.org/trunk@45375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-06-25 15:03:52 +00:00
parent ba24a8f6d3
commit 05c9032a0b
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45563'; $wp_version = '5.3-alpha-45564';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.