hook_system_info_alter
developer/hooks/core.php, строка 1109
- Версии
- 6
hook_system_info_alter(&$info, $file)
Изменяет информацию, получаемую из файлов .info модулей и тем.
This hook is invoked in module_rebuild_cache()
and in system_theme_data()
.
A module may implement this hook in order to add to or alter the data
generated by reading the .info file with drupal_parse_info_file()
.
Параметры
&$info
The .info file contents, passed by reference so that it can be altered.
$file
Full information about the module or theme, including $ It is not possible to add JavaScript
to the header at this point, and developers wishing to do so should use
hook_init()
instead.file->name, and
$file
->filename
Связанные темы
Код
<?php
function hook_system_info_alter(&$info, $file) {
// Only fill this in if the .info file does not define a 'datestamp'.
if (empty($info['datestamp'])) {
$info['datestamp'] = filemtime($file->filename);
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии