comments_link( string $deprecated = '', string $deprecated_2 = '' )
Display the link to the current post comments.
描述
参数
- $deprecated
-
(string)
(Optional)
Not Used.Default value: ”
- $deprecated_2
-
(string)
(Optional)
Not Used.Default value: ”
源代码
File: wp-includes/comment-template.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() );
}
更新日志
Version | 描述 |
---|---|
0.71 | Introduced. |
相关函数
Uses
-
wp-includes/formatting.php:
esc_url() -
wp-includes/functions.php:
_deprecated_argument() -
wp-includes/comment-template.php:
get_comments_link()
Used By
-
wp-includes/embed.php:
print_embed_comments_button() -
wp-includes/comment-template.php:
comments_popup_link()
User Contributed Notes
-
Skip to note content
You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note
Contributed by
Codex
Example
<a href="<?php comments_link(); ?>"> Comments to this post </a>
Note: The output of
comments_link()
is already escaped by core.
你可能对这些文章感兴趣:
- wordpress函数esc_html_x()用法示例
- wordpress函数esc_html()用法示例
- wordpress函数esc_html_e()用法示例
- wordpress函数esc_attr_x()用法示例
- wordpress函数esc_attr__()用法示例
- wordpress函数esc_attr()用法示例
- wordpress函数esc_attr_e()用法示例
- wordpress函数ent2ncr()用法示例
- wordpress函数enqueue_embed_scripts()用法示例
- wordpress函数enqueue_comment_hotkeys_js()用法示例
- wordpress函数edit_user()用法示例
- wordpress函数email_exists()用法示例
- wordpress函数endElement()用法示例
- wordpress函数edit_term_link()用法示例
如有疑问,请前往问答中心反馈!
反馈