After [33961], pass $comment to get_comment_link() where possible to avoid extra cache/db lookups.
See #33638. Built from https://develop.svn.wordpress.org/trunk@34042 git-svn-id: http://core.svn.wordpress.org/trunk@34010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -193,7 +193,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
||||
<?php
|
||||
/* translators: 2: comment date, 3: comment time */
|
||||
printf( __( '<a href="%1$s">%2$s at %3$s</a>' ),
|
||||
esc_url( get_comment_link( $comment->comment_ID ) ),
|
||||
esc_url( get_comment_link( $comment ) ),
|
||||
/* translators: comment date format. See http://php.net/date */
|
||||
get_comment_date( __( 'Y/m/d' ), $comment ),
|
||||
get_comment_date( get_option( 'time_format' ), $comment )
|
||||
|
||||
@@ -69,7 +69,7 @@ if ( !defined('ABSPATH') )
|
||||
|
||||
<div id="minor-publishing-actions">
|
||||
<div id="preview-action">
|
||||
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
|
||||
<a class="preview button" href="<?php echo get_comment_link( $comment ); ?>" target="_blank"><?php _e('View Comment'); ?></a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
@@ -120,7 +120,7 @@ if ( current_user_can( 'edit_post', $post_id ) ) {
|
||||
if ( $comment->comment_parent ) :
|
||||
$parent = get_comment( $comment->comment_parent );
|
||||
if ( $parent ) :
|
||||
$parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
|
||||
$parent_link = esc_url( get_comment_link( $comment ) );
|
||||
$name = get_comment_author( $parent );
|
||||
?>
|
||||
<div class="misc-pub-section misc-pub-reply-to">
|
||||
|
||||
Reference in New Issue
Block a user