Commit 3fdddd8e authored by Gábor Hojtsy's avatar Gábor Hojtsy

#152926 by dww: add hook_system_info_alter() to make .info file data modifiable in PHP code

parent 8650d5a7
......@@ -123,6 +123,10 @@ function module_rebuild_cache() {
// Merge in defaults and save.
$files[$filename]->info = $file->info + $defaults;
// Invoke hook_system_info_alter() to give installed modules a chance to
// modify the data in the .info files if necessary.
drupal_alter('system_info', $files[$filename]->info, $files[$filename]);
// Log the critical hooks implemented by this module.
$bootstrap = 0;
foreach (bootstrap_hooks() as $hook) {
......
......@@ -1091,6 +1091,11 @@ function system_theme_data() {
// Read info files for each theme
foreach ($themes as $key => $theme) {
$themes[$key]->info = drupal_parse_info_file($theme->filename) + $defaults;
// Invoke hook_system_info_alter() to give installed modules a chance to
// modify the data in the .info files if necessary.
drupal_alter('system_info', $themes[$key]->info, $themes[$key]);
if (!empty($themes[$key]->info['base theme'])) {
$sub_themes[] = $key;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment