You are here

function geshifilter_init in GeSHi Filter for syntax highlighting 6

Same name and namespace in other branches
  1. 7 geshifilter.module \geshifilter_init()

Implementation of hook_init().

File

./geshifilter.module, line 150
An input filter for syntax highlighting using the GeSHi library.

Code

function geshifilter_init() {

  // Since the filtered content is cached, it is not possible to know on which
  // pages the css file is actually needed. Thus it is included on all pages.
  if (variable_get('geshifilter_css_mode', GESHIFILTER_CSS_INLINE) == GESHIFILTER_CSS_CLASSES_AUTOMATIC) {
    drupal_add_css(file_directory_path() . '/geshifilter-languages.css');
  }
  drupal_add_css(drupal_get_path('module', 'geshifilter') . '/geshifilter.css');
}