mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Lazy-load comment meta on single post pages.
[34268] introduced cache priming for commentmeta, enabled by default. To ensure performance on single post pages - where commentmeta is most likely to cause performance issues - we disable up-front cache-priming. Instead, we prime commentmeta caches for all comments in the loop the first time `get_comment_meta()` is called on the page. Props bradt, dd32, wonderboymusic, boonebgorges. Fixes #16894. git-svn-id: https://develop.svn.wordpress.org/trunk@34270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1211,6 +1211,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false
|
||||
'orderby' => 'comment_date_gmt',
|
||||
'status' => 'approve',
|
||||
'post_id' => $post->ID,
|
||||
'update_comment_meta_cache' => false, // We lazy-load comment meta for performance.
|
||||
);
|
||||
|
||||
if ( $user_ID ) {
|
||||
|
||||
Reference in New Issue
Block a user