You are here

function wysiwyg_filter_filter in WYSIWYG Filter 6

Implementation of hook_filter().

File

./wysiwyg_filter.module, line 12
Provides an input filter that allows site administrators configure which HTML elements, attributes and style properties are allowed.

Code

function wysiwyg_filter_filter($op, $delta = 0, $format = -1, $text = '') {
  if ($op == 'list') {
    return array(
      0 => t('WYSIWYG Filter'),
    );
  }
  else {
    if ($op == 'description') {
      if ($delta == 0) {
        return t('Allows you to restrict whether users can post HTML and which tags and attributes per HTML tag to filter out.');
      }
    }
    else {
      if ($op == 'settings') {
        if ($delta == 0) {
          module_load_include('inc', 'wysiwyg_filter', 'wysiwyg_filter.admin');
          return wysiwyg_filter_settings_filter($format);
        }
      }
      else {
        if ($op == 'process') {
          if ($delta == 0) {
            module_load_include('inc', 'wysiwyg_filter', 'wysiwyg_filter.pages');
            return wysiwyg_filter_process($text, $format);
          }
        }
        else {
          return $text;
        }
      }
    }
  }
}