You are here

function jstools_theme_include in Javascript Tools 6

Same name and namespace in other branches
  1. 5 jstools.module \jstools_theme_include()

Load an include file for the current theme.

To avoid having to prematurely initialize the theme, call this function from a hook_footer() implementation. hook_footer() typically is called after the theme has been initiated, but before the header has been generated.

1 call to jstools_theme_include()
jstools_theme_data in ./jstools.module
Load theme-specific data.

File

./jstools.module, line 46
Provide common methods used by jstools package modules.

Code

function jstools_theme_include($module) {
  global $theme;
  $current_theme = $theme ? $theme : variable_get('theme_default', 'garland');
  $file = drupal_get_path('module', $module) . '/theme/' . $current_theme . '.inc';
  if (file_exists($file)) {
    include_once $file;
    return TRUE;
  }
  return FALSE;
}