function styleswitcher_page_attachments in Style Switcher 8.2
Same name and namespace in other branches
- 3.0.x styleswitcher.module \styleswitcher_page_attachments()
Implements hook_page_attachments().
File
- ./
styleswitcher.module, line 23 - Module's hooks implementations and helper functions.
Code
function styleswitcher_page_attachments(array &$attachments) {
// Add the dynamic CSS to every page. Use a library instead of straight
// html_head_link attachment because we need our alternative stylesheets to
// overwrite the most other css on the page and in standard html.html.twig
// css goes after head.
$attachments['#attached']['library'][] = 'styleswitcher/dynamic-css';
}