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
This commit is contained in:
gziolo 2022-04-05 09:21:02 +00:00
parent 4e622757ea
commit 1bb507149e
3 changed files with 4 additions and 3 deletions

View File

@ -151,9 +151,9 @@ if ( $user_id ) {
if ( $locked ) {
$user = get_userdata( $user_id );
$user_details = array(
'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(

View File

@ -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 ),
);

View File

@ -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.