path_to_theme

Versions
4.6 – 7
path_to_theme()

Return the path to the current themed element.

It can point to the active theme or the module handling a themed implementation. For example, when invoked within the scope of a theming call it will depend on where the theming function is handled. If implemented from a module, it will point to the module. If implemented from the active theme, it will point to the active theme. When called outside the scope of a theming call, it will always point to the active theme.

▾ 3 functions call path_to_theme()

garland_get_ie_styles in themes/garland/template.php
Generates IE CSS links for LTR and RTL languages.
seven_process_html in themes/seven/template.php
Override or insert variables into the page template.
template_preprocess in includes/theme.inc
Adds a default set of helper variables for variable processors and templates. This comes in before any other preprocess function which makes it possible to be used in default theme implementations (non-overriden theme functions).

Code

includes/theme.inc, line 968

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

  if (!isset($theme_path)) {
    drupal_theme_initialize();
  }

  return $theme_path;
}
?>
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.