From fc328f5484fce9ae9b04d0f6d034a593a15b0769 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 11 Sep 2015 06:05:24 +0000 Subject: [PATCH] After [33961], pass `$comment` to `get_comment_author_link()` where possible to avoid extra cache/db lookups. See #33638. Built from https://develop.svn.wordpress.org/trunk@34039 git-svn-id: http://core.svn.wordpress.org/trunk@34007 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/comment.php | 4 ++-- wp-admin/edit-form-comment.php | 2 +- wp-includes/class-walker-comment.php | 4 ++-- wp-includes/comment-template.php | 2 +- wp-includes/theme-compat/comments-popup.php | 2 +- wp-includes/version.php | 2 +- wp-includes/widgets/class-wp-widget-recent-comments.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-admin/comment.php b/wp-admin/comment.php index ab0235218c..7e86f03cb0 100644 --- a/wp-admin/comment.php +++ b/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/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index dda2615134..fe49043927 100644 --- a/wp-admin/edit-form-comment.php +++ b/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 {