You are here

function autofloat_page_attachments in AutoFloat 8

Implements hook_page_build().

File

./autofloat.module, line 13
Autofloat module: A filter that floats images left and right automatically.

Code

function autofloat_page_attachments(&$page) {
  if (\Drupal::config('autofloat.settings')
    ->get('css') == 1) {

    // Add CSS assets to all pages.
    // @see drupal_process_attached()
    $page['#attached']['library'][] = 'autofloat/autofloat';
  }
}