From db702bc3ea62f0f9625a31b5cb7c7351248a3466 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 11 Sep 2015 06:04:22 +0000 Subject: [PATCH] After [33961], pass `$comment` to `get_comment_author_link()` where possible to avoid extra cache/db lookups. See #33638. git-svn-id: https://develop.svn.wordpress.org/trunk@34039 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/comment.php | 4 ++-- src/wp-admin/edit-form-comment.php | 2 +- src/wp-includes/class-walker-comment.php | 4 ++-- src/wp-includes/comment-template.php | 2 +- src/wp-includes/theme-compat/comments-popup.php | 2 +- src/wp-includes/widgets/class-wp-widget-recent-comments.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php index ab0235218c..7e86f03cb0 100644 --- a/src/wp-admin/comment.php +++ b/src/wp-admin/comment.php @@ -180,8 +180,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved if ( $comment->comment_parent ) { $parent = get_comment( $comment->comment_parent ); - $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); - $name = get_comment_author( $parent->comment_ID ); + $parent_link = esc_url( get_comment_link( $parent ) ); + $name = get_comment_author( $parent ); printf( ' | ' . __( 'In reply to %2$s.' ), $parent_link, $name ); } ?> diff --git a/src/wp-admin/edit-form-comment.php b/src/wp-admin/edit-form-comment.php index dda2615134..fe49043927 100644 --- a/src/wp-admin/edit-form-comment.php +++ b/src/wp-admin/edit-form-comment.php @@ -121,7 +121,7 @@ if ( $comment->comment_parent ) : $parent = get_comment( $comment->comment_parent ); if ( $parent ) : $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); - $name = get_comment_author( $parent->comment_ID ); + $name = get_comment_author( $parent ); ?>
- %s says:' ), get_comment_author_link() ); ?> + %s says:' ), get_comment_author_link( $comment ) ); ?>
comment_approved ) : ?> @@ -313,7 +313,7 @@ class Walker_Comment extends Walker {