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


Top ↑

Return Return

(bool) True if closed, false if not


Top ↑

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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.