bbp_is_topic_spam( int $topic_id )

Is the topic marked as spam?

Description

Parameters

$topic_id

(Optional) Topic id

Return

(bool) True if spam, false if not.

Source

File: bp-forums/topics/template.php

1228
1229
1230
1231
function bbp_is_topic_spam( $topic_id = 0 ) {
    $topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) ) === bbp_get_spam_status_id();
    return (bool) apply_filters( 'bbp_is_topic_spam', (bool) $topic_status, $topic_id );
}

Changelog

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