WordPress.org

Make WordPress Core

Ticket #9712: link-template.php.diff

File link-template.php.diff, 522 bytes (added by JohnLamansky, 9 years ago)

I named the filter "post_comments_feed_link_html" because "post_comments_feed_link" is already used to filter the href URL.

  • wp-includes/link-template.php

     
    442442        $url = get_post_comments_feed_link($post_id, $feed);
    443443        if ( empty($link_text) )
    444444                $link_text = __('Comments Feed');
    445 
    446         echo "<a href='$url'>$link_text</a>";
     445       
     446        echo apply_filters( 'post_comments_feed_link_html', "<a href='$url'>$link_text</a>", $link_text, $post_id, $feed );
    447447}
    448448
    449449/**