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.

git-svn-id: https://develop.svn.wordpress.org/trunk@54939 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonny Harris 2022-12-06 13:40:47 +00:00
parent f889a5c7ff
commit 7a9ffd079d

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;