You are here

function add_to_head_css_alter in Add To Head 8

Implements hook_css_alter().

File

./add_to_head.module, line 109
Add To Head allows arbitrary insertion of code into the head of the page based on path selection.

Code

function add_to_head_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets) {
  $settings = add_to_head_get_settings('styles');

  // If applicable, append each profile's code to the output.
  foreach ($settings as $profile) {
    if (_add_to_head_profile_visible($profile)) {

      // @TODO - this does not work yet.
      //      $css[$profile['code']] = [
      //        'type' => 'inline',
      //      ];
    }
  }
}