bbp_template_include

Template Compatibility.

Description

add_filter( 'bbp_template_include', (string) $bbp_template_include_theme_supports, (int) $int, (int) $int ); 

If you want to completely bypass this and manage your own custom bbPress template hierarchy, start here by removing this filter, then look at how bbp_template_include() works and do something similar. :)

Parameters (3)

0. $bbp_template_include_theme_supports (string) => 'bbp_template_include_theme_supports'
The bbp template include theme supports.
1. $int (int) => 2
The int.
2. $int (int) => 1
The int.

Usage

To run the hook, copy the example below.
  1. $bbp_template_include_theme_supports = apply_filters( 'bbp_template_include', $bbp_template_include_theme_supports, $int, $int ); 
  2.  
  3. if ( !empty( $bbp_template_include_theme_supports ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bbp_template_include callback 
  2. function filter_bbp_template_include( $bbp_template_include_theme_supports, $int, $int ) { 
  3. // make filter magic happen here... 
  4. return $bbp_template_include_theme_supports
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bbp_template_include', 'filter_bbp_template_include', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bbp_template_include', 'filter_bbp_template_include', 10, 3 ); 

Defined (3)

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

/includes/core/filters.php  
  1. add_filter( 'bbp_template_include', 'bbp_template_include_theme_supports', 2, 1 ); 
  1. add_filter( 'bbp_template_include', 'bbp_template_include_theme_compat', 4, 2 ); 
/includes/core/sub-actions.php  
  1. return apply_filters( 'bbp_template_include', $template );