Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
3fdddd8e
Commit
3fdddd8e
authored
Jun 27, 2007
by
Gábor Hojtsy
Browse files
#152926
by dww: add hook_system_info_alter() to make .info file data modifiable in PHP code
parent
8650d5a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/module.inc
View file @
3fdddd8e
...
...
@@ -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
)
{
...
...
modules/system/system.module
View file @
3fdddd8e
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment