1 update_test.module | update_test_update_status_alter(&$projects) |
Implements hook_update_status_alter().
Checks the 'update.settings:update_status' configuration and sees if we need to alter the update status for the given project based on the setting. The setting is expected to be a nested associative array. If the key '#all' is defined, its subarray will include .info keys and values for all modules and themes on the system. Otherwise, the settings array is keyed by the module, theme, or layout short name and the subarrays contain settings just for that module, theme, or layout.
File
- core/
modules/ update/ tests/ update_test/ update_test.module, line 72 - Module for testing Update Manager functionality.
Code
function update_test_update_status_alter(&$projects) {
$setting = config_get('update.settings', 'update_status');
if (!empty($setting)) {
foreach ($projects as $project_name => &$project) {
foreach (array('#all', $project_name) as $id) {
if (!empty($setting[$id])) {
foreach ($setting[$id] as $key => $value) {
$project[$key] = $value;
}
}
}
}
}
}