WordPress.org

Make WordPress Core

Ticket #4477: widgets-php.diff

File widgets-php.diff, 1.0 KB (added by jhodgdon, 8 years ago)

Patch to add filter to post titles for Recent Comments widget

  • E:/EclipseWork/WordPressDev/wp-includes/widgets.php

     
    754754                        <?php echo $before_title . $title . $after_title; ?> 
    755755                        <ul id="recentcomments"><?php 
    756756                        if ( $comments ) : foreach ($comments as $comment) : 
    757                         echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; 
     757                        echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . apply_filters( 'the_title', get_the_title($comment->comment_post_ID)) . '</a>') . '</li>'; 
    758758                        endforeach; endif;?></ul> 
    759759                <?php echo $after_widget; ?> 
    760760<?php