diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 8be25e10d5..0569a75862 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -516,7 +516,7 @@ function get_comment_link( $comment = null, $args = array() ) { * @return string The link to the comments */ function get_comments_link($post_id = 0) { - return get_permalink($post_id) . '#comments'; + return apply_filters( 'get_comments_link', get_permalink( $post_id ) . '#comments', $post_id ); } /** @@ -532,7 +532,7 @@ function comments_link( $deprecated = '', $deprecated_2 = '' ) { _deprecated_argument( __FUNCTION__, '0.72' ); if ( !empty( $deprecated_2 ) ) _deprecated_argument( __FUNCTION__, '1.3' ); - echo get_comments_link(); + echo esc_url( get_comments_link() ); } /** diff --git a/wp-includes/feed.php b/wp-includes/feed.php index c0b2440825..76b9bbb2cd 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -198,7 +198,7 @@ function the_permalink_rss() { * @return none */ function comments_link_feed() { - echo esc_url( get_comments_link() ); + echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) ); } /** @@ -239,7 +239,7 @@ function get_comment_guid($comment_id = null) { * @since 1.5.0 */ function comment_link() { - echo esc_url( get_comment_link() ); + echo esc_url( apply_filters( 'comment_link', get_comment_link() ) ); } /**