comment_post

动作钩子::在将注释插入数据库后立即激发。

do_action( ‘comment_post’, int $comment_ID , int|string $comment_approved , array $commentdata )

参数(Parameters)

参数类型说明
$comment_ID(int)评论ID。
$comment_approved(int | string)如果评论被批准,则为1;如果没有,则为0;如果是垃圾邮件,则为“垃圾邮件”。
$commentdata(array)注释数据。
更新版本源码位置使用被使用
4.5.0wp-includes/comment.php:216510

笔记(Notes)

下面的示例使用comment_post挂钩在发布注释后立即运行函数。函数检查注释是否被批准,如果批准,则执行指定的代码。

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索