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

    r34039 r34042  
    112112                $output .= sprintf( _x( '%1$s on %2$s', 'widgets' ),
    113113                    '<span class="comment-author-link">' . get_comment_author_link( $comment ) . '</span>',
    114                     '<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
     114                    '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
    115115                );
    116116                $output .= '</li>';
Note: See TracChangeset for help on using the changeset viewer.