function admin_css_library_info_alter in Admin CSS 8
Implements hook_library_info_alter().
File
- ./
admin_css.module, line 24 - Hook implementations for the Admin CSS module.
Code
function admin_css_library_info_alter(&$libraries, $extension) {
$theme = \Drupal::theme()
->getActiveTheme()
->getName();
if ($theme === $extension) {
if (!isset($libraries['admin_css.admin_css']['css'])) {
// Add the library to the active theme with a relatively high weight.
$libraries['admin_css.admin_css']['css']['theme']['public://admin-style.css']['weight'] = 9999;
}
}
}