bbp_is_forum_closed( int $forum_id, bool $check_ancestors = true )
Is the forum closed?
Description Description
Parameters Parameters
- $forum_id
-
(Optional) Forum id
- $check_ancestors
-
(Optional) Check if the ancestors are closed (only if they're a category)
Default value: true
Return Return
(bool) True if closed, false if not
Source Source
File: includes/forums/template.php
function bbp_is_forum_closed( $forum_id = 0, $check_ancestors = true ) { // Get the forum ID $forum_id = bbp_get_forum_id( $forum_id ); // Check if the forum or one of it's ancestors is closed $retval = bbp_is_forum_status( $forum_id, bbp_get_closed_status_id(), $check_ancestors, 'OR' ); // Filter & return return (bool) apply_filters( 'bbp_is_forum_closed', (bool) $retval, $forum_id, $check_ancestors ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |