bbp_is_single_topic()

Viewing a single topic

Description

Return

(bool)

Source

File: bp-forums/common/template.php

254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
function bbp_is_single_topic() {
 
    // Assume false
    $retval = false;
 
    // Edit is not a single topic
    if ( bbp_is_topic_edit() )
        return false;
 
    // Single and a match
    if ( is_singular( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_single_topic' ) )
        $retval = true;
 
    return (bool) apply_filters( 'bbp_is_single_topic', $retval );
}

Changelog

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