From 7d706a562d48e89afb1cb44390cf9b9f848e8fe6 Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Sat, 30 Dec 2006 20:59:11 +0000 Subject: #105726 by moshe weitzman. Remove necessity to hard-code theme engine directories since they can change. --- includes/theme.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index 05626586a..a0a1e1654 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -214,6 +214,21 @@ function path_to_theme() { return dirname($themes[$theme]->filename); } +/** + * Return the path to the currently selected engine. + */ +function path_to_engine() { + global $theme, $theme_engine; + + if (!isset($theme)) { + init_theme(); + } + + $engines = list_theme_engines(); + + return dirname($engines[$theme_engine]->filename); +} + /** * Retrieve an associative array containing the settings for a theme. * -- cgit v1.2.3