untrashed_post_comments
云策文档标注
概述
untrashed_post_comments 是一个 WordPress 动作钩子,在文章评论从回收站恢复后触发。它主要用于开发者处理评论恢复后的相关操作。
关键要点
- 触发时机:当文章评论从回收站恢复后立即执行。
- 参数:$post_id(整数类型),表示文章 ID。
- 相关函数:wp_untrash_post_comments() 用于从回收站恢复文章评论。
- 版本历史:自 WordPress 2.9.0 版本引入。
原文内容
Fires after comments are restored for a post from the Trash.
Parameters
$post_idint-
Post ID.
Source
do_action( 'untrashed_post_comments', $post_id );
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |