You are here

addtocopy.install in Add link to copied text 7

Same filename and directory in other branches
  1. 6 addtocopy.install

File

addtocopy.install
View source
<?php

/**
 * Implements hook_uninstall().
 */
function addtocopy_uninstall() {
  variable_del('addtocopy_selector');
  variable_del('addtocopy_minlen');
  variable_del('addtocopy_htmlcopytxt');
  variable_del('addtocopy_addcopyfirst');
  variable_del('addtocopy_library_path');
}

/**
 * Implements hook_requirements().
 */
function addtocopy_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time
  $t = get_t();
  if ($phase == 'runtime') {
    if ($addtocopy_version = _addtocopy_library_version()) {
      $requirements['addtocopy'] = array(
        'title' => $t('Add to Copy library'),
        'value' => $addtocopy_version,
        'severity' => REQUIREMENT_OK,
      );
    }
    else {
      $requirements['addtocopy'] = array(
        'title' => $t('Add to Copy library'),
        'value' => $t('Add to Copy library is missing'),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}

Functions