Add optional post ID arg to get_comments_link(). Props scribu. fixes #12249

git-svn-id: https://develop.svn.wordpress.org/trunk@13171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-02-16 17:54:19 +00:00
parent 04a67c293e
commit 6ce57fbc72
1 changed files with 3 additions and 2 deletions

View File

@ -512,10 +512,11 @@ function get_comment_link( $comment = null, $args = array() ) {
*
* @since 1.5.0
*
* @param int $post_id Optional post id
* @return string The link to the comments
*/
function get_comments_link() {
return get_permalink() . '#comments';
function get_comments_link($post_id = 0) {
return get_permalink($post_id) . '#comments';
}
/**