Make WordPress Core


Ignore:
Timestamp:
03/06/2013 07:57:31 PM (12 years ago)
Author:
nacin
Message:

Add filters to comments_link_feed(), comment_link(), and get_comments_link(). esc_url() the echoed output of comments_link().

props MarcusPope.
fixes #19210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r22123 r23624  
    517517 */
    518518function get_comments_link($post_id = 0) {
    519     return get_permalink($post_id) . '#comments';
     519    return apply_filters( 'get_comments_link', get_permalink( $post_id ) . '#comments', $post_id );
    520520}
    521521
     
    533533    if ( !empty( $deprecated_2 ) )
    534534        _deprecated_argument( __FUNCTION__, '1.3' );
    535     echo get_comments_link();
     535    echo esc_url( get_comments_link() );
    536536}
    537537
Note: See TracChangeset for help on using the changeset viewer.