WordPress弹出评论链接标签:comments_popup_link

WordPress模板标签comments_popup_link用于输出弹出评论的链接,当使用了comments_popup_script()函数时,点击该链接可实现弹出窗口评论,如果没有使用comments_popup_script()函数,则输出普通的跳转到评论区域的链接。

由于comments_popup_script()函数在WordPress 4.5版本已弃用,所以comments_popup_link()也变得没有意义。

comments_popup_link( string $zero = false, string $one = false, string $more = false, string $css_class = '', string $none = false )

函数参数

$zero

字符串值,默认值:No Comments

没有评论时显示的内容。

$one

字符串值,默认值:1 Comment

只有一条评论时显示的内容。

$more

字符串值,默认值:% Comments

大于一条评论时显示的内容。

$css_class

字符串值,默认值为空

链接的class类名称

$none

字符串值,默认值:Comments Off

评论关闭时显示的内容

函数使用示例

扩展阅读

comments_popup_link()函数位于:wp-includes/comment-template.php

相关函数:

原创文章,作者:,如若转载,请注明出处:https://ce.771633.xyz/2126.html

Like (0)
Previous 2025年3月8日
Next 2025年3月8日

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注