From 4a6a7edf5500f9cce4bd7a074ba09f1dabb1542a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 11 Sep 2015 06:14:04 +0000 Subject: [PATCH] After [33961], pass `$comment` to `get_comment_date()` where possible to avoid extra cache/db lookups. See #33638. git-svn-id: https://develop.svn.wordpress.org/trunk@34041 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/comment.php | 4 ++-- src/wp-includes/class-walker-comment.php | 4 ++-- src/wp-includes/theme-compat/comments-popup.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php index 7e86f03cb0..24b0e16e40 100644 --- a/src/wp-admin/comment.php +++ b/src/wp-admin/comment.php @@ -195,8 +195,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved printf( __( '%2$s at %3$s' ), esc_url( get_comment_link( $comment->comment_ID ) ), /* translators: comment date format. See http://php.net/date */ - get_comment_date( __( 'Y/m/d' ) ), - get_comment_date( get_option( 'time_format' ) ) + get_comment_date( __( 'Y/m/d' ), $comment ), + get_comment_date( get_option( 'time_format' ), $comment ) ); ?> diff --git a/src/wp-includes/class-walker-comment.php b/src/wp-includes/class-walker-comment.php index c8c379961b..75d5e466c3 100644 --- a/src/wp-includes/class-walker-comment.php +++ b/src/wp-includes/class-walker-comment.php @@ -271,7 +271,7 @@ class Walker_Comment extends Walker {
@@ -321,7 +321,7 @@ class Walker_Comment extends Walker { diff --git a/src/wp-includes/theme-compat/comments-popup.php b/src/wp-includes/theme-compat/comments-popup.php index bd7a5db71a..1643d8f7ff 100644 --- a/src/wp-includes/theme-compat/comments-popup.php +++ b/src/wp-includes/theme-compat/comments-popup.php @@ -52,7 +52,7 @@ if ( post_password_required($post) ) { // and it doesn't match the cookie
  • -

    %4$s'), get_comment_author_link( $comment ), get_comment_date(), get_comment_ID(), get_comment_time()); ?>

    +

    %4$s'), get_comment_author_link( $comment ), get_comment_date( '', $comment ), get_comment_ID(), get_comment_time()); ?>