Community Documentation

path_to_theme

5 theme.inc path_to_theme()
6 theme.inc path_to_theme()
7 theme.inc path_to_theme()
8 theme.inc path_to_theme()

Return the path to the currently selected theme.

▾ 3 functions call path_to_theme()

chameleon_page in themes/chameleon/chameleon.theme
_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

<?php
function path_to_theme() {
  global $theme;

  if (!isset($theme)) {
    init_theme();
  }

  $themes = list_themes();

  return dirname($themes[$theme]->filename);
}
?>
Login or register to post comments