显示当前帖子评论的链接。
原型
comments_link( string $deprecated = '', string $deprecated_2 = '' )
参数
$deprecated
(string)
(Optional)
不曾用过。
$deprecated_2
(string)
(Optional)
不曾用过。
源文件
路径:wp-includes/comment-template.php
<?php
...
function comments_link( $deprecated = '', $deprecated_2 = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '0.72' );
if ( !empty( $deprecated_2 ) )
_deprecated_argument( __FUNCTION__, '1.3.0' );
echo esc_url( get_comments_link() );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/comments_link/