bp_add_template_stack_locations( array $stacks = array() )
Add template locations to template files being searched for.
Description Description
Parameters Parameters
- $stacks
-
(Optional) Array of template locations.
Default value: array()
Return Return
(array) Array of all template locations registered so far.
Source Source
File: bp-core/bp-core-template-loader.php
function bp_add_template_stack_locations( $stacks = array() ) {
$retval = array();
// Get alternate locations.
$locations = bp_get_template_locations();
// Loop through locations and stacks and combine.
foreach ( (array) $stacks as $stack ) {
foreach ( (array) $locations as $custom_location ) {
$retval[] = untrailingslashit( trailingslashit( $stack ) . $custom_location );
}
}
/**
* Filters the template locations to template files being searched for.
*
* @since 1.7.0
*
* @param array $value Array of all template locations registered so far.
* @param array $stacks Array of template locations.
*/
return apply_filters( 'bp_add_template_stack_locations', array_unique( $retval ), $stacks );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.7.0 | Introduced. |