Ticket #19893: 19893.diff
File 19893.diff, 654 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/comment-template.php
703 703 * @return string The link to the comments. 704 704 */ 705 705 function get_comments_link( $post_id = 0 ) { 706 $comments_link = get_permalink( $post_id ) . '#comments'; 706 $post = get_post( $post_id ); 707 if ( ! empty( $post->comment_count ) ) { 708 $hash = '#comments'; 709 } else { 710 $hash = '#respond'; 711 } 712 713 $comments_link = get_permalink( $post ) . $hash; 707 714 /** 708 715 * Filter the returned post comments permalink. 709 716 *