function drush_unused_modules in Unused Modules 7
Same name and namespace in other branches
- 8 unused_modules.drush.inc \drush_unused_modules()
- 6 unused_modules.drush.inc \drush_unused_modules()
Drush command callback.
File
- ./
unused_modules.drush.inc, line 48 - Unused Modules Drush support.
Code
function drush_unused_modules($type = "projects", $show = "disabled") {
// Print projects.
if ($type == 'projects') {
if ($show == 'all') {
drush_unused_modules_show_projects('all');
}
elseif ($show == 'disabled') {
drush_unused_modules_show_projects('disabled');
}
else {
drush_set_error("unknown 'show' argument " . $show . ". See drush unused-modules --help");
}
}
elseif ($type == 'modules') {
if ($show == 'all') {
drush_print($show);
drush_unused_modules_show_modules('all');
}
elseif ($show == 'disabled') {
drush_unused_modules_show_modules('disabled');
}
else {
drush_set_error("unknown 'show' argument " . $show . ". See drush unused-modules --help");
}
}
else {
drush_set_error("unknown 'type' argument " . $type . ". See drush unused-modules --help");
}
}