autofloat.install in AutoFloat 6
Same filename and directory in other branches
Sets post-install messages and deletes variables when uninstalled.
File
autofloat.installView source
<?php
/**
* @file
* Sets post-install messages and deletes variables when uninstalled.
*/
/**
* Implements hook_install().
*/
function autofloat_install() {
$t = get_t();
$text = $t('Add the AutoFloat filter to a text format under !formats_link. Move it below other image related filters in the filter processing order. AutoFloat settings are available under !config_link.', array(
'!formats_link' => l($t('Site configuration > Input formats'), 'admin/settings/filters'),
'!config_link' => l($t('Site configuration > AutoFloat'), 'admin/settings/autofloat'),
));
drupal_set_message($text);
}
/**
* Implements hook_uninstall().
*/
function autofloat_uninstall() {
// Delete all variables set in variable table.
db_query("DELETE FROM {variable} WHERE name LIKE 'autofloat_%%'");
cache_clear_all('variables', 'cache_bootstrap');
}
Functions
Name | Description |
---|---|
autofloat_install | Implements hook_install(). |
autofloat_uninstall | Implements hook_uninstall(). |