You are here

function swftools_filter in SWF Tools 6

Same name and namespace in other branches
  1. 5 swftools.module \swftools_filter()
  2. 6.3 swftools.module \swftools_filter()
  3. 6.2 swftools.module \swftools_filter()
1 string reference to 'swftools_filter'
swftools_filter_tips in ./swftools.module

File

./swftools.module, line 1000

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 <swf 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);
  }
}