5ef312655b2c9273af86c8e9bb87089e7b07631f
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / page_attachments_alter.twig
1 /**
2  * Implements hook_page_attachments_alter().
3  */
4 function {{ machine_name }}_page_attachments_alter(array &$attachments) {
5   // Conditionally remove an asset.
6   if (in_array('core/jquery', $attachments['#attached']['library'])) {
7     $index = array_search('core/jquery', $attachments['#attached']['library']);
8     unset($attachments['#attached']['library'][$index]);
9   }
10 }