Make WordPress Core

Changeset 54939


Ignore:
Timestamp:
12/06/2022 01:40:47 PM (20 months ago)
Author:
spacedmonkey
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/revision.php

    r54749 r54939  
    195195    $show_avatars = get_option( 'show_avatars' );
    196196
    197     cache_users( wp_list_pluck( $revisions, 'post_author' ) );
     197    update_post_author_caches( $revisions );
    198198
    199199    $can_restore = current_user_can( 'edit_post', $post->ID );
Note: See TracChangeset for help on using the changeset viewer.