You are here

function flash_filter in Flash Node 5

Implementation of hook_filter()

File

./flash.module, line 766

Code

function flash_filter($op, $delta = 0, $format = -1, $text = '') {
  switch ($op) {
    case 'list':
      return array(
        0 => t('Flash'),
      );
    case 'description':
      return t('Add flash to your posts using a flash macro.');
    case 'process':
      foreach (flash_get_macros($text) as $unexpanded_macro => $macro) {
        $expanded_macro = flash_content($macro);
        $text = str_replace($unexpanded_macro, $expanded_macro, $text);
      }
      return $text;
    default:
      return $text;
  }
}