bb_template

The BuddyPress bb template hook.

Description

apply_filters( 'bb_template', (unknown) $template, (unknown) $file_used ); 

Parameters (2)

0. $template (unknown)
The template.
1. $file_used (unknown)
The file used.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. $template = apply_filters( 'bb_template', $template, $file_used );