You are here

toc_filter.install in TOC filter 6

Same filename and directory in other branches
  1. 7 toc_filter.install

Installation information for the 'Table of contents filter' module.

File

toc_filter.install
View source
<?php

/**
 * @file
 * Installation information for the 'Table of contents filter' module.
 */

/**
 * Implementation of hook_uninstall().
 */
function toc_filter_uninstall() {
  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_6103() {
  $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

Namesort descending Description
toc_filter_uninstall Implementation of hook_uninstall().
toc_filter_update_6103 Change 'toc_filter_ol_default_title' and 'toc_filter_ul_default_title' to 'toc_filter_numbered_default_title' and 'toc_filter_bullet_default_title'