Comments: Prime post caches in WP_Comments_List_Table.
In the `WP_Comments_List_Table` class, when the function `get_comments` is called, pass the parameter `update_comment_post_cache` set to true. This primes all the related posts for the displayed comments. This improves performance, as all posts are primed at once. Props spacedmonkey, adarshposimyth. Fixes #57802. Built from https://develop.svn.wordpress.org/trunk@55513 git-svn-id: http://core.svn.wordpress.org/trunk@55045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c80f206e94
commit
39e6d6d348
|
@ -140,16 +140,17 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
);
|
||||
|
||||
$args = array(
|
||||
'status' => isset( $status_map[ $comment_status ] ) ? $status_map[ $comment_status ] : $comment_status,
|
||||
'search' => $search,
|
||||
'user_id' => $user_id,
|
||||
'offset' => $start,
|
||||
'number' => $number,
|
||||
'post_id' => $post_id,
|
||||
'type' => $comment_type,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'post_type' => $post_type,
|
||||
'status' => isset( $status_map[ $comment_status ] ) ? $status_map[ $comment_status ] : $comment_status,
|
||||
'search' => $search,
|
||||
'user_id' => $user_id,
|
||||
'offset' => $start,
|
||||
'number' => $number,
|
||||
'post_id' => $post_id,
|
||||
'type' => $comment_type,
|
||||
'orderby' => $orderby,
|
||||
'order' => $order,
|
||||
'post_type' => $post_type,
|
||||
'update_comment_post_cache' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-alpha-55512';
|
||||
$wp_version = '6.3-alpha-55513';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue