Make WordPress Core


Ignore:
Timestamp:
09/11/2015 06:20:56 AM (9 years ago)
Author:
wonderboymusic
Message:

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

See #33638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-walker-comment.php

    r34041 r34042  
    230230        <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( '', $comment ); ?>>
    231231            <div class="comment-body">
    232                 <?php _e( 'Pingback:' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
     232                <?php _e( 'Pingback:' ); ?> <?php comment_author_link( $comment ); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
    233233            </div>
    234234<?php
     
    269269        <?php endif; ?>
    270270
    271         <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID, $args ) ); ?>">
     271        <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
    272272            <?php
    273273                /* translators: 1: comment date, 2: comment time */
     
    318318
    319319                    <div class="comment-metadata">
    320                         <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID, $args ) ); ?>">
     320                        <a href="<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>">
    321321                            <time datetime="<?php comment_time( 'c' ); ?>">
    322322                                <?php
Note: See TracChangeset for help on using the changeset viewer.