bbp_is_topic_published( int $topic_id )

Is the topic not spam or deleted?

Description

Parameters

$topic_id

(int) (Optional) Topic id

Return

(bool) True if published, false if not.

Source

File: bp-forums/topics/template.php

function bbp_is_topic_published( $topic_id = 0 ) {
	$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) ) === bbp_get_public_status_id();
	return (bool) apply_filters( 'bbp_is_topic_published', (bool) $topic_status, $topic_id );
}

Changelog

Changelog
Version Description
bbPress (r3496) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.