toc_filter.install in TOC filter 7
Same filename and directory in other branches
Installation information for the 'Table of contents filter' module.
File
toc_filter.installView source
<?php
/**
* @file
* Installation information for the 'Table of contents filter' module.
*/
/**
* Implements hook_uninstall().
*/
function toc_filter_uninstall() {
variable_del('toc_filter_default_top');
variable_del('toc_filter_default_type');
variable_del('toc_filter_header_tag');
variable_del('toc_filter_number_default_title');
variable_del('toc_filter_bullet_default_title');
variable_del('toc_filter_faq_default_title');
variable_del('toc_filter_jump_menu_default_title');
variable_del('toc_filter_smooth_scroll');
variable_del('toc_filter_smooth_scroll_duration');
}
/**
* Change 'toc_filter_ol_default_title' and 'toc_filter_ul_default_title' to 'toc_filter_numbered_default_title' and 'toc_filter_bullet_default_title'
*/
function toc_filter_update_7103() {
$variables = array(
'toc_filter_ol_default_title' => 'toc_filter_number_default_title',
'toc_filter_ul_default_title' => 'toc_filter_bullet_default_title',
);
foreach ($variables as $from => $to) {
if ($value = variable_get($from, '')) {
variable_set($to, $value);
}
variable_del($from);
}
}
Functions
Name | Description |
---|---|
toc_filter_uninstall | Implements hook_uninstall(). |
toc_filter_update_7103 | Change 'toc_filter_ol_default_title' and 'toc_filter_ul_default_title' to 'toc_filter_numbered_default_title' and 'toc_filter_bullet_default_title' |