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:
parent
04a67c293e
commit
6ce57fbc72
@ -512,10 +512,11 @@ function get_comment_link( $comment = null, $args = array() ) {
|
|||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
* @param int $post_id Optional post id
|
||||||
* @return string The link to the comments
|
* @return string The link to the comments
|
||||||
*/
|
*/
|
||||||
function get_comments_link() {
|
function get_comments_link($post_id = 0) {
|
||||||
return get_permalink() . '#comments';
|
return get_permalink($post_id) . '#comments';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user