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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-02-16 17:54:19 +00:00
parent 9d2b6b6047
commit 88f317209e

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';
}
/**