bp_get_template_locations

Get the possible subdirectories to check for templates in.

Description

(array) bp_get_template_locations( (array) $templates = array() ); 

Returns (array)

Possible subfolders to look in.

Parameters (1)

0. $templates — Optional. (array) => array()
Templates we are looking for.

Usage

  1. if ( !function_exists( 'bp_get_template_locations' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template-loader.php'; 
  3.  
  4. // Templates we are looking for. 
  5. $templates = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_get_template_locations($templates); 
  9.  

Defined (1)

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

/bp-core/bp-core-template-loader.php  
  1. function bp_get_template_locations( $templates = array() ) { 
  2. $locations = array( 
  3. buddypress,  
  4. 'community',  
  5. '' 
  6. ); 
  7.  
  8. /** 
  9. * Filters the possible subdirectories to check for templates in. 
  10. * @since 1.7.0 
  11. * @param array $locations Array of subfolders to look in. 
  12. * @param array $templates Array of templates we are looking for. 
  13. */ 
  14. return apply_filters( 'bp_get_template_locations', $locations, $templates );