function hook_system_info_alter
hook_system_info_alter(&$info, $file, $type)
Alter the information parsed from module and theme .info files
This hook is invoked in _system_rebuild_module_data() and in _system_rebuild_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().
Parameters
$info: The .info file contents, passed by reference so that it can be altered.
$file: Full information about the module or theme, including $file->name, and $file->filename
$type: Either 'module' or 'theme', depending on the type of .info file that was passed.
Related topics
File
- modules/system/system.api.php, line 2070
- Hooks provided by Drupal core and the System module.
Code
function hook_system_info_alter(&$info, $file, $type) { // Only fill this in if the .info file does not define a 'datestamp'. if (empty($info['datestamp'])) { $info['datestamp'] = filemtime($file->filename); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_system_info_alter/7.x