You are here

function smiley_filter in Smiley 6

Implementation of hook_filter().

File

./smiley.module, line 234

Code

function smiley_filter($op, $delta = 0, $format = -1, $text = "") {
  switch ($op) {
    case 'list':
      return array(
        0 => t('Smileys filter'),
      );
    case 'description':
      return t('Replaces smiley inside posts with images.');
    case 'settings':
      $form['smiley_filter'] = array(
        '#type' => 'fieldset',
        '#title' => t('Smileys filter'),
        '#value' => t('You can define a global list of smiley on the !page.', array(
          '!page' => l(t('smiley settings page'), 'admin/settings/smiley'),
        )),
      );
      return $form;
    case "process":
      return smiley_filter_process($text);
    default:
      return $text;
  }
}