You are here

extlink.install in External Links 7

Same filename and directory in other branches
  1. 8 extlink.install
  2. 6 extlink.install

Install file for External Links module.

File

extlink.install
View source
<?php

/**
 * @file
 * Install file for External Links module.
 */

/**
 * Implements hook_install().
 */
function extlink_install() {

  // Weight needs to be 1 for compatibility with SpamSpan.
  db_update('system')
    ->fields(array(
    'weight' => 1,
  ))
    ->condition('name', 'extlink', '=')
    ->execute();
}

/**
 * Implements hook_uninstall().
 */
function extlink_uninstall() {
  variable_del('extlink_alert');
  variable_del('extlink_alert_text');
  variable_del('extlink_class');
  variable_del('extlink_css_exclude');
  variable_del('extlink_css_explicit');
  variable_del('extlink_exclude');
  variable_del('extlink_icon_placement');
  variable_del('extlink_img_class');
  variable_del('extlink_include');
  variable_del('extlink_label');
  variable_del('extlink_mailto_class');
  variable_del('extlink_mailto_label');
  variable_del('extlink_subdomains');
  variable_del('extlink_target');
  variable_del('extlink_use_font_awesome');
  cache_clear_all('variables', 'cache');
}

/**
 * Delete "extlink_target_value" variable (now uses "extlink_target" directly).
 */
function extlink_update_7101(&$sandbox) {
  variable_del('extlink_target_value');
}

Functions

Namesort descending Description
extlink_install Implements hook_install().
extlink_uninstall Implements hook_uninstall().
extlink_update_7101 Delete "extlink_target_value" variable (now uses "extlink_target" directly).