function system_add_module_assets
system_add_module_assets()
Adds CSS and JavaScript files declared in module .info files.
File
- modules/system/system.module, line 1945
- Configuration system that lets administrators modify the workings of the site.
Code
function system_add_module_assets() { foreach (system_get_info('module') as $module => $info) { if (!empty($info['stylesheets'])) { foreach ($info['stylesheets'] as $media => $stylesheets) { foreach ($stylesheets as $stylesheet) { drupal_add_css($stylesheet, array('every_page' => TRUE, 'media' => $media)); } } } if (!empty($info['scripts'])) { foreach ($info['scripts'] as $script) { drupal_add_js($script, array('every_page' => TRUE)); } } } }
© 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.module/function/system_add_module_assets/7.x