function spoiler_filter in Spoiler 5
Same name and namespace in other branches
- 6 spoiler.module \spoiler_filter()
Implementation of hook_filter().
File
- ./
spoiler.module, line 27 - Spoiler module: This module allows users to hide potential "spoiler" content by inserting them between [spoiler][/spoiler] tags. These tags will be converted to HTML by this filter and the relevant CSS rules will set the foreground and…
Code
function spoiler_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(
0 => t('Spoiler filter'),
);
case 'description':
return t('Converts [spoiler][/spoiler] tags into HTML and sets the foreground and background colours to the same value, effectively rendering the content within invisible.');
case 'process':
return _spoiler_filter_process($text);
default:
return $text;
}
}