BP_Forums_Component::setup_globals( $args = array() )

Setup globals

Description

The BP_FORUMS_SLUG constant is deprecated, and only used here for backwards compatibility.

Source

File: bp-forums/classes/class-bp-forums-component.php

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
public function setup_globals( $args = array() ) {
    $bp = buddypress();
 
    // Define the parent forum ID
    if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) )
        define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
 
    // Define a slug, if necessary
    if ( !defined( 'BP_FORUMS_SLUG' ) )
        define( 'BP_FORUMS_SLUG', $this->id );
 
    // All arguments for forums component
    $args = array(
        'path'          => BP_PLUGIN_DIR,
        'slug'          => bp_get_option( '_bbp_root_slug', BP_FORUMS_SLUG ),
        'root_slug'     => isset( $bp->pages->forums->slug ) ? $bp->pages->forums->slug : BP_FORUMS_SLUG,
        'has_directory' => false,
        'search_string' => __( 'Search Forums…', 'buddyboss' ),
    );
 
    parent::setup_globals( $args );
}

Changelog

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