bbp_is_topic_trash( int $topic_id )

Is the topic trashed?

Description

Parameters

$topic_id

(int) (Optional) Topic id

Return

(bool) True if trashed, false if not.

Source

File: bp-forums/topics/template.php

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

Changelog

Changelog
Version Description
bbPress (r2888) 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.