comment_on_password_protected
云策文档标注
概述
comment_on_password_protected 是一个 WordPress Hook,在用户尝试对受密码保护的文章发表评论时触发。它主要用于处理评论提交过程中的特定事件。
关键要点
- Hook 名称:comment_on_password_protected
- 触发时机:当用户尝试对受密码保护的文章发表评论时
- 参数:$comment_post_id(整数类型,表示文章 ID)
- 相关函数:wp_handle_comment_submission() 用于处理评论提交
- 引入版本:WordPress 2.9.0
原文内容
Fires when a comment is attempted on a password-protected post.
Parameters
$comment_post_idint-
Post ID.
Source
do_action( 'comment_on_password_protected', $comment_post_id );
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |