get_comments_number_text()
get_comments_number_text( string $zero = false, string $one = false, string $more = false, int|WP_Post $post_id )
显示当前文章评论数的语言字符串。
Displays the language string for the number of comments the current post has.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$zero | (string) | 可选 | 没有评论的文本。 |
$one | (string) | 可选 | 一条评论的文本。 |
$more | (string) | 可选 | 多条评论的文本。 |
$post_id | (int | WP_Post) | 可选 | Post ID或WP_Post对象。默认值为全局$post。 |
返回(Return)
(string)一篇文章的评论数的语言string。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.4.0 | wp-includes/comment-template.php:896 | 1 function | 7 |
get_comments_number_text() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_comments_number_text/