function toc_filter_filter in TOC filter 6
Implementation of hook_filter().
File
- ./
toc_filter.module, line 43 - Converts header tags into a linked table of contents.
Code
function toc_filter_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(
'Table of contents',
);
case 'no-cache':
return FALSE;
case 'description':
if (module_exists('ctools')) {
return t("Converts <@header_tag> tags to a linked table of contents or jump menu with an optional title. (i.e [TOC:(faq|numbered|jump-menu|menu) (title)]", array(
'@header_tag' => variable_get('toc_filter_header_tag', 'h3'),
));
}
else {
return t("Converts <@header_tag> tags to a linked table of contents with an optional title. (i.e [TOC:(faq|numbered) (title)]", array(
'@header_tag' => variable_get('toc_filter_header_tag', 'h3'),
));
}
case 'settings':
return _toc_filter_settings_callback($text);
case 'process':
return _toc_filter_process_callback($text);
default:
return $text;
}
}