Make WordPress Core


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

After [33961], pass $comment to get_comment_author_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

    r33962 r34039  
    262262        <div class="comment-author vcard">
    263263            <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
    264             <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link() ); ?>
     264            <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link( $comment ) ); ?>
    265265        </div>
    266266        <?php if ( '0' == $comment->comment_approved ) : ?>
     
    314314                    <div class="comment-author vcard">
    315315                        <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
    316                         <?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<b class="fn">%s</b>', get_comment_author_link() ) ); ?>
     316                        <?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<b class="fn">%s</b>', get_comment_author_link( $comment ) ) ); ?>
    317317                    </div><!-- .comment-author -->
    318318
Note: See TracChangeset for help on using the changeset viewer.