mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 10:14:31 +00:00
Comment caching. Reduce queries on edit-comments.php page. Add non-persistent cache groups. Hat tip to hovenko. fixes #4387
git-svn-id: https://develop.svn.wordpress.org/trunk@5666 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -151,7 +151,8 @@ if ( $extra_comments ) : ?>
|
||||
</tr>
|
||||
</thead>';
|
||||
foreach ($comments as $comment) {
|
||||
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
|
||||
$post = get_post($comment->comment_post_ID);
|
||||
$authordata = get_userdata($post->post_author);
|
||||
$comment_status = wp_get_comment_status($comment->comment_ID);
|
||||
$class = ('alternate' == $class) ? '' : 'alternate';
|
||||
$class .= ('unapproved' == $comment_status) ? ' unapproved' : '';
|
||||
|
||||
Reference in New Issue
Block a user