comment_flood_message
云策文档标注
概述
comment_flood_message 是一个 WordPress 过滤器钩子,用于修改评论洪水错误消息。它允许开发者自定义当用户评论过快时显示的错误提示文本。
关键要点
- comment_flood_message 是一个过滤器钩子,用于过滤评论洪水错误消息。
- 参数 $comment_flood_message 是一个字符串,表示评论洪水错误消息。
- 该钩子在 wp_check_comment_flood() 和 wp_allow_comment() 函数中被使用,用于检查评论洪水情况。
- 从 WordPress 5.2.0 版本开始引入。
代码示例
$comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) );
原文内容
Filters the comment flood error message.
Parameters
$comment_flood_messagestring-
Comment flood error message.
Source
$comment_flood_message = apply_filters( 'comment_flood_message', __( 'You are posting comments too quickly. Slow down.' ) );
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |