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


do_action( 'bp_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 'bp_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.


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

Defined (1)

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

  1. do_action( 'bp_locate_template', $located, $template_name, $template_names, $template_locations, $load, $require_once );