Make WordPress Core

Changeset 54099


Ignore:
Timestamp:
09/08/2022 10:15:15 AM (21 months ago)
Author:
spacedmonkey
Message:

Posts, Post Types: Call update_post_author_caches function in WP_Posts_List_Table class.

Call the update_post_author_caches function in the WP_Posts_List_Table class to prime post author caches in a single database request.

Props spacedmonkey, thakkarhardik, desrosj.
Fixes #56100.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r53414 r54099  
    791791            $this->comment_pending_count = get_pending_comments_num( $post_ids );
    792792        }
     793        update_post_author_caches( $posts );
    793794
    794795        foreach ( $posts as $post ) {
     
    886887        $ids = array_keys( $to_display );
    887888        _prime_post_caches( $ids );
     889        $_posts = array_map( 'get_post', $ids );
     890        update_post_author_caches( $_posts );
    888891
    889892        if ( ! isset( $GLOBALS['post'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.