comments_popup_script()

WordPress弹出评论脚本函数

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

相关函数:

cancel_comment_reply_link()
comment_author()
comment_author_email()
comment_author_email_link()
comment_author_IP()
comment_author_link()
comment_author_rss()
comment_author_url()
comment_author_url_link()
comment_class()
comment_date()
comment_excerpt()
comment_form_title()
comment_form()
comment_ID()
comment_id_fields()
comment_reply_link()
comment_text()
comment_text_rss()
comment_time()
comment_type()
comments_link()
comments_number()
comments_open()
comments_popup_link()
comments_rss_link()
get_avatar()
next_comments_link()
paginate_comments_links()
permalink_comments_rss()
previous_comments_link()
wp_list_comments()

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索