function recipe_requirements in Recipe 6
implementation of hook_requirements to make sure we let them know about the 'simple' editor option is depricated and will be removed post 1.0.
Parameters
$phase:
Return value
unknown_type
File
- ./
recipe.install, line 15 - Install, update and uninstall functions for the recipe module.
Code
function recipe_requirements($phase) {
if ($phase == 'runtime') {
$system = variable_get('recipe_ingredient_system', '');
//drupal_set_message($system);
$requirement = array();
if ($system == 'simple') {
drupal_set_message(t("The Recipe module Ingredient entering system is set to 'simple' which is deprecated. Please go to !settings and set this to 'complex'.", array(
"!settings" => l(t("Recipe Settings"), 'admin/settings/recipe'),
)));
$requirement['title'] = t("Recipe Ingredient system");
$requirement['severity'] = REQUIREMENT_WARNING;
$requirement['value'] = t("Not Set");
$requirement['description'] = t("The Recipe module Ingredient entering system is set to 'simple' which is deprecated. Please go to !settings and set this to 'complex'.", array(
"!settings" => l(t("Recipe Settings"), 'admin/settings/recipe'),
));
return array(
'recipe_ingredient_system',
$requirement,
);
}
}
return NULL;
}