function field_tokens_requirements in Field tokens 7
Implements hook_requirements().
File
- ./
field_tokens.install, line 11 - Install functions for the Field tokens module.
Code
function field_tokens_requirements($phase) {
$requirements = array();
// Ensure translations don't break during installation.
$t = get_t();
if (module_exists('formatted_field_tokens')) {
$requirements['formatted_field_tokens'] = array(
'title' => $t('Formatted Field tokens'),
'value' => $t('Enabled'),
'description' => $t('The Formatted Field tokens module is superseded by the Field tokens module, and should be disabled and deleted.'),
'severity' => REQUIREMENT_WARNING,
);
if ($phase == 'install') {
unset($requirements['formatted_field_tokens']['value']);
}
}
return $requirements;
}