WordPress弹出评论脚本标签:comments_popup_script

WordPress模板标签comments_popup_script用于输出支持弹出评论的JS脚本,可以使comments_popup_link()输出的链接实现弹出窗口中评论,通常在<head>标签之内使用。

comments_popup_script()在WordPress 4.5版本已弃用,可能是使用比较少的原因。

comments_popup_script(integer $width = 400, integer $height = 400, string $file = '')

函数参数

$width

整数型,默认值:400(单位是像素)

指定弹出窗口的宽度

$height

整数型,默认值:400(单位是像素)

指定弹出窗口的高度

$file

字符串值,默认值:none

弹出窗口的位置

函数使用示例

<?php comments_popup_script(); ?>

扩展阅读

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

相关函数:

阿里云