Make WordPress Core

Ticket #12249: get_comments_link.diff

File get_comments_link.diff, 525 bytes (added by scribu, 14 years ago)
  • wp-includes/comment-template.php

     
    512512 *
    513513 * @since 1.5.0
    514514 *
     515 * @param int $post_id Optional post id
    515516 * @return string The link to the comments
    516517 */
    517 function get_comments_link() {
    518         return get_permalink() . '#comments';
     518function get_comments_link($post_id = 0) {
     519        return get_permalink($post_id) . '#comments';
    519520}
    520521
    521522/**