After [33961], pass $comment to get_comment_date() where possible to avoid extra cache/db lookups.

See #33638.

Built from https://develop.svn.wordpress.org/trunk@34041


git-svn-id: http://core.svn.wordpress.org/trunk@34009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-11 06:15:24 +00:00
parent 58c3c30e8d
commit c3f642bea9
4 changed files with 6 additions and 6 deletions

View File

@ -195,8 +195,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
printf( __( '<a href="%1$s">%2$s at %3$s</a>' ),
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 )
);
?>
</td>

View File

@ -271,7 +271,7 @@ class Walker_Comment extends Walker {
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID, $args ) ); ?>">
<?php
/* translators: 1: comment date, 2: comment time */
printf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
?>
</div>
@ -321,7 +321,7 @@ class Walker_Comment extends Walker {
<time datetime="<?php comment_time( 'c' ); ?>">
<?php
/* translators: 1: comment date, 2: comment time */
printf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() );
printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );
?>
</time>
</a>

View File

@ -52,7 +52,7 @@ if ( post_password_required($post) ) { // and it doesn't match the cookie
<?php foreach ($comments as $comment) { ?>
<li id="comment-<?php comment_ID() ?>">
<?php comment_text() ?>
<p><cite><?php comment_type(); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link( $comment ), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
<p><cite><?php comment_type(); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link( $comment ), get_comment_date( '', $comment ), get_comment_ID(), get_comment_time()); ?></cite></p>
</li>
<?php } // end for each comment ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34040';
$wp_version = '4.4-alpha-34041';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.