bp_setup_theme_compat( string $theme = '' )

Set up the default theme compat theme.

Description

Parameters

$theme

(string) (Optional) The unique ID identifier of a theme package.

Default value: ''

Source

File: bp-core/bp-core-theme-compatibility.php

function bp_setup_theme_compat( $theme = '' ) {
	$bp = buddypress();

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

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

Changelog

Changelog
Version Description
BuddyPress 1.7.0 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.