You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
617 B
28 lines
617 B
1 month ago
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* Primary module hooks for theme_overrides_scholar module.
|
||
|
*/
|
||
|
|
||
|
|
||
|
use Drupal\Core\Asset\AttachedAssetsInterface;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Implements hook_css_alter().
|
||
|
*/
|
||
|
function theme_overrides_scholar_css_alter(&$css, AttachedAssetsInterface $assets) {
|
||
|
|
||
|
$library = \Drupal::service('library.discovery')->getLibraryByName('theme_overrides_scholar', 'global');
|
||
|
$path = $library['css'][0]['data'];
|
||
|
|
||
|
if (isset($css[$path])) {
|
||
|
$css[$path]['group'] = 300;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function theme_overrides_scholar_page_attachments(&$variables) {
|
||
|
$variables['#attached']['library'][] = 'theme_overrides_scholar/global';
|
||
|
}
|