function tableofcontents_filter_info in Table of Contents 7
Same name and namespace in other branches
- 7.2 tableofcontents.module \tableofcontents_filter_info()
Implementation of hook_filter_info().
File
- ./
tableofcontents.module, line 107 - This is a filter module to generate a collapsible jquery enabled mediawiki style table of contents based on <h[1-6]> tags. Transforms header tags into named anchors.
Code
function tableofcontents_filter_info() {
module_load_include('admin.inc', 'tableofcontents');
$filters['filter_toc'] = array(
'title' => t('Table of contents'),
'description' => t('Inserts a table of contents in place of [toc ...] tags.'),
'process callback' => '_tableofcontents_process',
'prepare callback' => '_tableofcontents_prepare',
'settings callback' => '_tableofcontents_settings',
'cache' => TRUE,
'tips callback' => 'tableofcontents_filter_tips',
);
$filters['filter_toc_id'] = array(
'title' => t('Assign an ID to each anchors'),
'description' => t('Add an ID to all the anchors on the page. May be necessary in case the table of contents block is used.'),
'process callback' => '_tableofcontents_process',
'prepare callback' => '_tableofcontents_prepare',
'settings callback' => '_tableofcontents_settings',
'cache' => TRUE,
'tips callback' => 'tableofcontents_filter_tips',
);
return $filters;
}