WordPress开发者和主题制作者的搜索引擎



comment_link ›

Since1.5.0
已弃用n/a
comment_link ( $comment = null )
参数:
  • (int|WP_Comment) $comment Optional. Comment object or id. Defaults to global comment object.
    Required: No
    默认: null
定义在:
文档:
Change Log:
  • 4.4.0

Display the link to the comments.



源码

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 ) ) );
}