Editor: Fix post lock data inconsistencies

Backporting fixes introduced in WordPress/gutenberg#37914.

Props Mamaduka.
Fixes #55238.



git-svn-id: https://develop.svn.wordpress.org/trunk@53070 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski 2022-04-05 09:19:58 +00:00
parent d0a0207851
commit f5cc51c8ca
3 changed files with 5 additions and 4 deletions

4
.env
View File

@ -28,7 +28,7 @@ LOCAL_PHP_MEMCACHED=false
#
# Supported values are `mysql` and `mariadb`.
##
LOCAL_DB_TYPE=mysql
LOCAL_DB_TYPE=mariadb
##
# The database version to use.
@ -38,7 +38,7 @@ LOCAL_DB_TYPE=mysql
# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions.
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
##
LOCAL_DB_VERSION=5.7
LOCAL_DB_VERSION=10
# The debug settings to add to `wp-config.php`.
LOCAL_WP_DEBUG=true

View File

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

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