You are here

function amazon_filter_filter in Amazon Product Advertisement API 6

Implementation of hook_filter().

File

amazon_filter/amazon_filter.module, line 35

Code

function amazon_filter_filter($op, $delta = 0, $format = -1, $text = '') {
  if ($op == 'list') {
    return array(
      0 => t('Amazon filter'),
    );
  }
  switch ($delta) {
    case 0:
      switch ($op) {
        case 'description':
          return t('Lets writers use the [amazon] tag to embed Amazon product information in text.');
        case 'prepare':
          return $text;
        case 'process':
          return _amazon_filter_process_text($text);
      }
      break;
  }
}