显示评论的链接。
原型
comment_link( int|WP_Comment $comment = null )
参数
$comment
(int|WP_Comment)
(Optional)
评论对象或ID。默认为全局注释对象。
源文件
路径:wp-includes/feed.php
<?php
...
function comment_link( $comment = null ) {
/**
* Filters the current comment's permalink.
*
* @since 3.6.0
*
* @see get_comment_link()
*
* @param string $comment_permalink The current comment permalink.
*/
echo esc_url( apply_filters( 'comment_link', get_comment_link( $comment ) ) );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/comment_link/