function css_editor_library_info_alter in CSS Editor 8
Implements hook_library_info_alter().
File
- ./
css_editor.module, line 14 - Allows users to apply customized CSS to themes.
Code
function css_editor_library_info_alter(&$libraries, $extension) {
$theme = \Drupal::theme()
->getActiveTheme()
->getName();
if ($extension == $theme) {
if ($file = _css_editor_get_stylesheet($theme)) {
// Append custom style sheet to theme libraries.
$libraries['css_editor']['css']['theme'][$file]['weight'] = 9999;
}
}
}