Editor: Include user's name in the `wp_refresh_post_lock()` response.

This ensures that the post lock data returned by the Heartbeat API is consistent.

Previously, `wp_check_locked_posts()` was updated to return the name of the user currently editing the post, but the `wp_refresh_post_lock()` response did not get a similar change.

Follow-up to [53070].

Props nathan.noom.
Fixes #56197.
Built from https://develop.svn.wordpress.org/trunk@53692


git-svn-id: http://core.svn.wordpress.org/trunk@53251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-07-11 18:18:13 +00:00
parent a5cc224b3c
commit 2cc9f73523
2 changed files with 2 additions and 1 deletions

View File

@ -1190,6 +1190,7 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
if ( $user ) {
$error = array(
'name' => $user->display_name,
/* translators: %s: User's display name. */
'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ),
);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53691';
$wp_version = '6.1-alpha-53692';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.