path_to_theme

Versions
4.6 – 7
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.

Code

includes/theme.inc, line 214

<?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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.