bp_is_theme_compat_original_template( string $template = '' )

Check whether a given template is the one that WP originally selected to display current page.

Description

Parameters

$template

(Optional) The template name to check.

Default value: ''

Return

(bool) True if the value of $template is the same as the "original_template" originally selected by WP. Otherwise false.

Source

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

function bp_is_theme_compat_original_template( $template = '' ) {
	$bp = buddypress();

	if ( empty( $bp->theme_compat->original_template ) ) {
		return false;
	}

	return (bool) ( $bp->theme_compat->original_template == $template );
}

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.