From 1bb507149e1337e2508844be68c3cf6bf44b21c6 Mon Sep 17 00:00:00 2001 From: gziolo Date: Tue, 5 Apr 2022 09:21:02 +0000 Subject: [PATCH] Editor: Fix post lock data inconsistencies Backporting fixes introduced in WordPress/gutenberg#37914. Props Mamaduka. Fixes #55238. Built from https://develop.svn.wordpress.org/trunk@53070 git-svn-id: http://core.svn.wordpress.org/trunk@52659 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 4 ++-- wp-admin/includes/misc.php | 1 + wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 9d683b2afd..e26ae1af6f 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -151,9 +151,9 @@ if ( $user_id ) { if ( $locked ) { $user = get_userdata( $user_id ); $user_details = array( - 'name' => $user->display_name, + 'avatar' => get_avatar_url( $user_id, array( 'size' => 128 ) ), + 'name' => $user->display_name, ); - $avatar = get_avatar_url( $user_id, array( 'size' => 64 ) ); } $lock_details = array( diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 3b4b6f3e47..c36f487b54 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -1137,6 +1137,7 @@ function wp_check_locked_posts( $response, $data, $screen_id ) { if ( $user && current_user_can( 'edit_post', $post_id ) ) { $send = array( + 'name' => $user->display_name, /* translators: %s: User's display name. */ 'text' => sprintf( __( '%s is currently editing' ), $user->display_name ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 582e9e40d2..139ecb852c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53069'; +$wp_version = '6.0-alpha-53070'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.