thread_comments_depth_max
云策文档标注
概述
thread_comments_depth_max 是一个 WordPress 过滤器钩子,用于控制嵌套评论的最大深度。它允许开发者自定义评论的嵌套层级限制。
关键要点
- thread_comments_depth_max 是一个过滤器钩子,用于设置嵌套评论的最大深度。
- 默认最大深度为 10,开发者可以通过此钩子修改该值。
- 该钩子从 WordPress 2.7.0 版本开始引入。
代码示例
$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
原文内容
Filters the maximum depth of threaded/nested comments.
Parameters
$max_depthint-
The maximum depth of threaded comments. Default 10.
Source
$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |