bbp_setup_theme_compat( BBP_Theme_Compat $theme = '' )

Setup the default theme compat theme

Description

Parameters

$theme

(BBP_Theme_Compat) (Optional)

Default value: ''

Source

File: bp-forums/core/theme-compat.php

function bbp_setup_theme_compat( $theme = '' ) {
	$bbp = bbpress();

	// Make sure theme package is available, set to default if not
	if ( ! isset( $bbp->theme_compat->packages[$theme] ) || ! is_a( $bbp->theme_compat->packages[$theme], 'BBP_Theme_Compat' ) ) {
		$theme = 'default';
	}

	// Set the active theme compat theme
	$bbp->theme_compat->theme = $bbp->theme_compat->packages[$theme];
}

Changelog

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