bp_setup_theme_compat( string $theme = '' )

Set up the default theme compat theme.


Description Description


Parameters Parameters

$theme

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

Default value: ''


Top ↑

Source 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 = 'legacy';
	}

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

Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.