isotope.install in Isotope (with Masonry and Packery) 7
Same filename and directory in other branches
Defines the functionality for isotope's requirements and uninstall process(es).
File
isotope.installView 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
Name | Description |
---|---|
isotope_requirements | Implements hook_requirements(). |
isotope_uninstall | Implements hook_uninstall(). |