bbp_set_theme_compat_templates

Set the theme compat templates global.

Description

bbp_set_theme_compat_templates( (array) $templates = array() ); 

Stash possible template files for the current query. Useful if plugins want to override them, or see what files are being scanned for inclusion.

Parameters (1)

0. $templates — Optional. (array) => array()
The templates.

Usage

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

Defined (1)

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

/includes/core/theme-compat.php  
  1. function bbp_set_theme_compat_templates( $templates = array() ) { 
  2. bbpress)->theme_compat->templates = $templates; 
  3.  
  4. returnbbpress)->theme_compat->templates;