Revisions: Use update_post_author_caches in wp_prepare_revisions_for_js function.

The `update_post_author_caches` function was added in [53482]. Replace call to `cache_users` function with `update_post_author_caches`, for consistency and code quality.  

Props benjgrolleau, spacedmonkey.
Fixes #56978.
Built from https://develop.svn.wordpress.org/trunk@54939


git-svn-id: http://core.svn.wordpress.org/trunk@54491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
spacedmonkey 2022-12-06 13:42:13 +00:00
parent a6da3647c8
commit 03fc3cde8e
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
$show_avatars = get_option( 'show_avatars' );
cache_users( wp_list_pluck( $revisions, 'post_author' ) );
update_post_author_caches( $revisions );
$can_restore = current_user_can( 'edit_post', $post->ID );
$current_id = false;

View File

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