bbp_add_template_stack_locations( array $stacks = array() )

Add template locations to template files being searched for


Description Description


Parameters Parameters

$stacks

(Optional)

Default value: array()


Top ↑

Return Return

(array())


Top ↑

Source Source

File: includes/core/template-functions.php

function bbp_add_template_stack_locations( $stacks = array() ) {
	$retval = array();

	// Get alternate locations
	$locations = bbp_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 );
		}
	}

	// Filter & return
	return (array) apply_filters( 'bbp_add_template_stack_locations', array_unique( $retval ), $stacks );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.