function tableofcontents_filter_tips in Table of Contents 6.2
Same name and namespace in other branches
- 5.2 tableofcontents.module \tableofcontents_filter_tips()
- 5 tableofcontents.module \tableofcontents_filter_tips()
- 6.3 tableofcontents.module \tableofcontents_filter_tips()
Implementation of hook_filter_tips().
File
- ./
tableofcontents.module, line 49 - 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_tips($delta, $format, $long = FALSE) {
$override = variable_get('tableofcontents_allow_override_' . $format, TRUE);
if ($long) {
if ($override) {
return t('Every instance of "<!--tableofcontents-->" in the input text will be replaced with a collapsible mediawiki-style table of contents. Accepts options for title, list style, minimum heading level, and maximum heading level, and attachments as follows: <!--tableofcontents list: ol; title: Table of Contents; minlevel: 2; maxlevel: 3; attachments: yes;-->. All arguments are optional.');
}
else {
return t('Every instance of "<!--tableofcontents-->" in the input text will be replaced with a collapsible mediawiki-style table of contents.');
}
}
else {
if ($override) {
return t('Insert <!--tableofcontents [list: ol; title: Table of Contents; minlevel: 2; maxlevel: 3; attachments: yes;]--> to insert a mediawiki style collapsible table of contents. Arguments within [] are optional.');
}
else {
return t('Insert <!--tableofcontents--> to insert a mediawiki style collapsible table of contents.');
}
}
}