/** * Add template locations to template files being searched for * * @since bbPress (r3738) * * @param array $templates * @return array() */ function bbp_add_template_locations($templates = array()) { $retval = array(); // Get alternate locations $locations = bbp_get_template_locations($templates); // Loop through locations and templates and combine foreach ((array) $locations as $location) { foreach ((array) $templates as $template) { $retval[] = ltrim(trailingslashit($location) . $template, '/'); } } return apply_filters('bbp_add_template_locations', array_unique($retval), $templates); }
/** * Add template locations to template files being searched for * * @since bbPress (r3738) * * @param array $templates * @return array() */ 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); } } return apply_filters('bbp_add_template_stack_locations', array_unique($retval), $stacks); }
/** * Add template locations to template files being searched for * * @since bbPress (r3738) * * @param array $templates * @return array() */ function bbp_add_template_locations($templates = array()) { $retval = array(); // Get alternate locations $locations = bbp_get_template_locations($templates); // Loop through locations and templates and combine foreach ($locations as $location) { foreach ($templates as $template) { $retval[] = trailingslashit($location) . $template; } } return apply_filters('bbp_add_template_locations', $retval, $templates); }