function tableofcontents_node_presave in Table of Contents 7
Implementation of hook_node_presave
File
- ./
tableofcontents.module, line 187 - 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_node_presave($node) {
if (isset($node->body)) {
if (variable_get('tableofcontents_remove_teaser_' . $node->body[$node->language][0]['format'], TRUE)) {
module_load_include('admin.inc', 'tableofcontents');
_tableofcontents_hide_in_teaser($node);
}
}
}