bp_docs_do_theme_compat

Should we do theme compatibility?.

Description

bp_docs_do_theme_compat( (bool) $template = false ); 

Do it whenever it's available in BuddyPress (whether enabled or not for the theme more generally)

Parameters (1)

0. $template — Optional. (bool) => false
The template.

Usage

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

Defined (1)

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

/includes/theme-bridge.php  
  1. function bp_docs_do_theme_compat( $template = false ) { 
  2. if ( ! class_exists( 'BP_Theme_Compat' ) ) { 
  3. return false; 
  4.  
  5. // Pre-theme-compat templates are not available for user tabs, so we 
  6. // force theme compat in these cases 
  7. if ( bp_is_user() ) { 
  8. return true; 
  9.  
  10. return apply_filters( 'bp_docs_do_theme_compat', true, $template );