tablesorter.install in Tablesorter 7
Same filename and directory in other branches
Tablesorter installation functions.
File
tablesorter.installView source
<?php
/**
* @file
* Tablesorter installation functions.
*/
/**
* Implements hook_requirements().
*/
function tablesorter_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
if ($phase == 'runtime') {
$js = libraries_load('tablesorter');
$requirements['tablesorter'] = array(
'title' => t('Tablesorter library'),
'value' => t('TableSorter %vs (<a href="@link">configure</a>)', array(
'%vs' => $js['version'],
'@link' => url('admin/config/user-interface/tablesorter'),
)),
'severity' => REQUIREMENT_OK,
);
}
return $requirements;
}
/**
* Implements hook_uninstall().
*/
function tablesorter_uninstall() {
$variables = array(
'tablesorter_theme',
'tablesorter_zebra',
'tablesorter_zebra_odd_class',
'tablesorter_zebra_even_class',
);
foreach ($variables as $variable) {
variable_del($variable);
}
}
Functions
Name | Description |
---|---|
tablesorter_requirements | Implements hook_requirements(). |
tablesorter_uninstall | Implements hook_uninstall(). |