You are here

function jstools_theme_include in Javascript Tools 5

Same name and namespace in other branches
  1. 6 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 59
Provide common methods used by jstools package modules.

Code

function jstools_theme_include($module) {
  global $theme;

  // Initialize theme if necessary.
  if (!isset($theme)) {
    init_theme();
  }
  $file = drupal_get_path('module', $module) . '/theme/' . $theme . '.inc';
  if (file_exists($file)) {
    include_once $file;
    return TRUE;
  }
  return FALSE;
}