bbp_is_forum_closed (intforum_id美元,保龄球check_ancestors美元=真正的)
论坛关闭了吗?
描述
参数
- forum_id美元
-
(int)(可选)论坛id
- check_ancestors美元
-
(保龄球)(可选)检查祖先是否关闭(仅当它们是一个类别时)
默认值:真
返回
(保龄球)如果关闭则为True,否则为false
源
文件:bp-forums /论坛/ template.php
函数bbp_is_forum_closed($forum_id = 0, $ check_columns = true) {$forum_id = bbp_get_forum_id($forum_id);$retval = (bbp_get_close_status_id () === bbp_get_forum_status($forum_id));If (!empty($check_ancestor)) {$ancestor = bbp_get_forum_ancestor ($forum_id);Foreach ((array) $ancestor as $ancestor) {if (bbp_is_forum_category($ancestor, false) && bbp_is_forum_closed($ancestor, false)) {$retval = true;}}} return (bool) apply_filters('bbp_is_forum_closed', (bool) $retval, $forum_id, $ check_columns);}
更新日志
版本 | 描述 |
---|---|
bbPress (r2746) | 介绍了。 |