You are here

function geshifilter_filter in GeSHi Filter for syntax highlighting 6

Same name and namespace in other branches
  1. 5.2 geshifilter.module \geshifilter_filter()
  2. 5 geshifilter.module \geshifilter_filter()

Implementation of hook_filter().

File

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

Code

function geshifilter_filter($op, $delta = 0, $format = -1, $text = '') {
  switch ($op) {
    case 'list':
      return array(
        'GeSHi filter',
      );
    case 'description':
      return t('Enables syntax highlighting of inline/block source code using the GeSHi engine');
    case 'prepare':
      require_once drupal_get_path('module', 'geshifilter') . '/geshifilter.pages.inc';
      return _geshifilter_prepare($format, $text);
    case 'process':
      require_once drupal_get_path('module', 'geshifilter') . '/geshifilter.pages.inc';
      return _geshifilter_process($format, $text);
    case 'settings':
      require_once drupal_get_path('module', 'geshifilter') . '/geshifilter.admin.inc';
      return _geshifilter_filter_settings($format);
    case 'no cache':
      return FALSE;
    default:
      return $text;
  }
}