bbp_is_theme_compat_original_template

Set the theme compat original_template global.

Description

bbp_is_theme_compat_original_template( (string) $template = '' ); 

Stash the original template file for the current query. Useful for checking if bbPress was able to find a more appropriate template.

Parameters (1)

0. $template — Optional. (string) => ''
The template.

Usage

  1. if ( !function_exists( 'bbp_is_theme_compat_original_template' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/theme-compat.php'; 
  3.  
  4. // The template. 
  5. $template = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_is_theme_compat_original_template($template); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/core/theme-compat.php  
  1. function bbp_is_theme_compat_original_template( $template = '' ) { 
  2. $bbp =bbpress); 
  3.  
  4. if ( empty( $bbp->theme_compat->original_template ) ) 
  5. return false; 
  6.  
  7. return (bool) ( $bbp->theme_compat->original_template === $template );