You are here

function geshifilter_filter in GeSHi Filter for syntax highlighting 5.2

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

Implementation of hook_filter().

File

./geshifilter.module, line 171
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 'geshifilter.pages.inc';
      return _geshifilter_prepare($format, $text);
    case 'process':
      require_once 'geshifilter.pages.inc';
      return _geshifilter_process($format, $text);
    case 'settings':
      require_once 'geshifilter.admin.inc';
      return _geshifilter_filter_settings($format);
    case 'no cache':
      return false;
    default:
      return $text;
  }
}