bbp_add_template_stack_locations

Add template locations to template files being searched for.

Description

(array()) bbp_add_template_stack_locations( (array) $stacks = array() ); 

Returns (array())

Parameters (1)

0. $stacks — Optional. (array) => array()
The stacks.

Usage

  1. if ( !function_exists( 'bbp_add_template_stack_locations' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/template-functions.php'; 
  3.  
  4. // The stacks. 
  5. $stacks = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_add_template_stack_locations($stacks); 
  9.  

Defined (1)

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

/includes/core/template-functions.php  
  1. function bbp_add_template_stack_locations( $stacks = array() ) { 
  2. $retval = array(); 
  3.  
  4. // Get alternate locations 
  5. $locations = bbp_get_template_locations(); 
  6.  
  7. // Loop through locations and stacks and combine 
  8. foreach ( (array) $stacks as $stack ) 
  9. foreach ( (array) $locations as $custom_location ) 
  10. $retval[] = untrailingslashit( trailingslashit( $stack ) . $custom_location ); 
  11.  
  12. return apply_filters( 'bbp_add_template_stack_locations', array_unique( $retval ), $stacks );