mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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:
parent
f889a5c7ff
commit
7a9ffd079d
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user