bp_check_theme_template_pack_dependency()

Maybe override the preferred template pack if the theme declares a dependency.

Description

Source

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

function bp_check_theme_template_pack_dependency() {
	if ( bp_is_deactivation() ) {
		return;
	}

	$all_packages = array_keys( buddypress()->theme_compat->packages );

	foreach ( $all_packages as $package ) {
		// e.g. "buddypress-use-nouveau", "buddypress-use-legacy".
		if ( ! current_theme_supports( "buddypress-use-{$package}" ) ) {
			continue;
		}

		bp_setup_theme_compat( $package );
		return;
	}
}

Changelog

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