You are here

isotope.install in Isotope (with Masonry and Packery) 7

Same filename and directory in other branches
  1. 7.2 isotope.install

Defines the functionality for isotope's requirements and uninstall process(es).

File

isotope.install
View source
<?php

/**
 * @file
 * Defines the functionality for isotope's requirements and
 * uninstall process(es).
 */

/**
 * Implements hook_requirements().
 */
function isotope_requirements($phase) {
  $requirements = array();
  $t = get_t();

  // If the libray folder was not found the library is not installed properly.
  module_load_include('module', 'libraries');
  $libpath = libraries_get_path('isotope');
  if (is_dir($libpath) != TRUE) {
    $readme_url = url(drupal_get_path('module', 'isotope') . '/README.txt');
    $requirements['isotope'] = array(
      'title' => $t('Isotope.js'),
      'description' => $t('The Isotope.js library folder was not found. Please see <a href="@url">README.txt</a> in the isotope module directory for proper library installation details.', array(
        '@url' => $readme_url,
      )),
      'severity' => REQUIREMENT_ERROR,
      'value' => NULL,
    );
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function isotope_uninstall() {
  variable_del('isotope_settings');
}

Functions