You are here

function swftools_filter in SWF Tools 5

Same name and namespace in other branches
  1. 6.3 swftools.module \swftools_filter()
  2. 6 swftools.module \swftools_filter()
  3. 6.2 swftools.module \swftools_filter()

File

./swftools.module, line 1032

Code

function swftools_filter($op, $delta = 0, $format = -1, $text = '') {
  switch ($op) {
    case 'list':
      return array(
        0 => t('SWF Tools Filter'),
      );
    case 'no cache':
      return FALSE;
    case 'description':
      return t('Substitutes [swf file="filename.flv"] or [swflist files="file1.jpg&&file2.jpg"] with embedding code.');
    case 'prepare':

      // replace <swf > with [swf ] to prevent other filters stripping
      return preg_replace('/\\<(swflist|swf)\\s*(.*)>/sU', '[\\1 \\2]', $text);
    case 'process':
      return _swftools_filter_process_text($text);
    default:
      return $text;
  }
}