function patterns_process_modules in Patterns 5
File
- ./
patterns.module, line 1138 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_process_modules($modules, $op = 'enable') {
// Enable at the beginning of the pattern. Disable at the end.
for ($i = 0; $module = $modules[$i]; $i++) {
if ($op == 'enable' && $module['delete'] || $op == 'disable' && !$module['delete']) {
unset($modules[$i]);
}
}
patterns_invoke($empty, 'tag modules');
$error = patterns_invoke($modules, 'pre-validate');
// Error validating modules
if ($error) {
return $error;
}
patterns_invoke($modules, 'prepare');
}