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/widgets/class-wp-widget-recent-comments.php

    r33954 r34039  
    111111                /* translators: comments widget: 1: comment author, 2: post link */
    112112                $output .= sprintf( _x( '%1$s on %2$s', 'widgets' ),
    113                     '<span class="comment-author-link">' . get_comment_author_link( $comment->comment_ID ) . '</span>',
     113                    '<span class="comment-author-link">' . get_comment_author_link( $comment ) . '</span>',
    114114                    '<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
    115115                );
Note: See TracChangeset for help on using the changeset viewer.