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 Description


Parameters Parameters

$template

(Optional) The template name to check.

Default value: ''


Top ↑

Return Return

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


Top ↑

Source 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 );
}

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.