mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
9d2b6b6047
commit
88f317209e
@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user