bbp_locate_template

This action exists only to follow the standard bbPress coding convention, and should not be used to short-circuit any part of the template locator.

Description

do_action( 'bbp_locate_template', (unknown) $located, (string) $template_name, (string) $template_names, (unknown) $template_locations, (unknown) $load, (unknown) $require_once ); 

If you want to override a specific template part, please either filter 'bbp_get_template_part' or add a new location to the template stack.

Parameters (6)

0. $located (unknown)
The located.
1. $template_name (string)
The template name.
2. $template_names (string)
The template names.
3. $template_locations (unknown)
The template locations.
4. $load (unknown)
The load.
5. $require_once (unknown)
The require once.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bbp_locate_template', $located, $template_name, $template_names, $template_locations, $load, $require_once ); 
The following example is for adding a hook callback.
  1. // define the bbp_locate_template callback 
  2. function action_bbp_locate_template( $located, $template_name, $template_names, $template_locations, $load, $require_once ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bbp_locate_template', 'action_bbp_locate_template', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bbp_locate_template', 'action_bbp_locate_template', 10, 6 ); 

Defined (1)

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

/includes/core/template-functions.php  
  1. do_action( 'bbp_locate_template', $located, $template_name, $template_names, $template_locations, $load, $require_once );