|
|
|
@ -4,3 +4,24 @@
|
|
|
|
|
* @file |
|
|
|
|
* Primary module hooks for theme_overrides module. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Drupal\Core\Asset\AttachedAssetsInterface; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Implements hook_css_alter(). |
|
|
|
|
*/ |
|
|
|
|
function theme_overrides_css_alter(&$css, AttachedAssetsInterface $assets) { |
|
|
|
|
|
|
|
|
|
$library = \Drupal::service('library.discovery')->getLibraryByName('theme_overrides', 'global'); |
|
|
|
|
$path = $library['css'][0]['data']; |
|
|
|
|
|
|
|
|
|
if (isset($css[$path])) { |
|
|
|
|
$css[$path]['group'] = 300; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function theme_overrides_page_attachments(&$variables) { |
|
|
|
|
$variables['#attached']['library'][] = 'theme_overrides/global'; |
|
|
|
|
} |
|
|
|
|