bbp_setup_theme_compat

Setup the default theme compat theme.

Description

bbp_setup_theme_compat( (string) $theme = '' ); 

Parameters (1)

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

Usage

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

Defined (1)

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

/includes/core/theme-compat.php  
  1. function bbp_setup_theme_compat( $theme = '' ) { 
  2. $bbp =bbpress); 
  3.  
  4. // Make sure theme package is available, set to default if not 
  5. if ( ! isset( $bbp->theme_compat->packages[$theme] ) || ! is_a( $bbp->theme_compat->packages[$theme], 'BBP_Theme_Compat' ) ) { 
  6. $theme = 'default'; 
  7.  
  8. // Set the active theme compat theme 
  9. $bbp->theme_compat->theme = $bbp->theme_compat->packages[$theme];