From bb5f4769089b60bfc7f2abe50d51dd62ef106eed Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 11 Jul 2022 18:22:22 +0000 Subject: [PATCH] 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. Merges [53692] to the 6.0 branch. Fixes #56197. Built from https://develop.svn.wordpress.org/branches/6.0@53693 git-svn-id: http://core.svn.wordpress.org/branches/6.0@53252 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/misc.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 20aad2464a..7e1ca3f7ad 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -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 ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 52469b0ae8..eabbcefb29 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0.1-RC1-53668'; +$wp_version = '6.0.1-RC1-53693'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.