You are here

elf.install in External Links Filter 7.3

Same filename and directory in other branches
  1. 8 elf.install
  2. 6.3 elf.install

Installation and uninstallation functions.

File

elf.install
View source
<?php

/**
 * @file
 *   Installation and uninstallation functions.
 */

/**
 * Implement hook_uninstall().
 */
function elf_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'elf_%%'");
  cache_clear_all('variables', 'cache');
}

/**
 * Implement hook_requirements().
 */
function elf_requirements($phase) {
  $requirements = array();
  $loaded = extension_loaded('DOM');
  $requirements["elf_extension_dom"] = array(
    'title' => 'DOM',
    'value' => $loaded ? t('Loaded') : t('Not loaded'),
    'severity' => $loaded ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    'description' => $loaded ? NULL : t('External Links Filter requires PHP\'s <a href="!url">Document Object Model</a>.', array(
      '!url' => 'http://php.net/manual/en/book.dom.php',
    )),
  );
  return $requirements;
}

/**
 * Resets the text format caches.
 */
function elf_update_7001() {
  filter_formats_reset();
}

Functions

Namesort descending Description
elf_requirements Implement hook_requirements().
elf_uninstall Implement hook_uninstall().
elf_update_7001 Resets the text format caches.