comment_form_comments_closed
云策文档标注
概述
comment_form_comments_closed 是一个 WordPress 动作钩子,在评论关闭时触发于评论表单之后。此钩子也用于向后兼容,当 comment_form() 被调用时若帖子对象或 ID 无效也会触发。
关键要点
- 触发时机:评论关闭后,在评论表单之后执行。
- 向后兼容:如果 comment_form() 被调用时帖子对象或 ID 无效,此钩子也会触发。
- 相关函数:与 comment_form() 函数关联,用于模板中输出完整的评论表单。
- 版本历史:自 WordPress 3.0.0 版本引入。
原文内容
Fires after the comment form if comments are closed.
Description
For backward compatibility, this action also fires if comment_form() is called with an invalid post object or ID.
Source
do_action( 'comment_form_comments_closed' );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |