You are here

function path_to_theme in Drupal 5

Same name and namespace in other branches
  1. 4 includes/theme.inc \path_to_theme()
  2. 6 includes/theme.inc \path_to_theme()
  3. 7 includes/theme.inc \path_to_theme()

Return the path to the currently selected theme.

4 calls to path_to_theme()
chameleon_page in themes/chameleon/chameleon.theme
page.tpl.php in themes/garland/page.tpl.php
_phptemplate_default in themes/engines/phptemplate/phptemplate.engine
Default callback for PHPTemplate.
_phptemplate_default_variables in themes/engines/phptemplate/phptemplate.engine
Adds additional helper variables to all templates.

File

includes/theme.inc, line 214
The theme system, which controls the output of Drupal.

Code

function path_to_theme() {
  global $theme;
  if (!isset($theme)) {
    init_theme();
  }
  $themes = list_themes();
  return dirname($themes[$theme]->filename);
}