Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / system / tests / modules / system_module_test / system_module_test.module
1 <?php
2
3 /**
4  * @file
5  * Provides System module hook implementations for testing purposes.
6  */
7
8 /**
9  * Implements hook_page_attachments_alter().
10  */
11 function system_module_test_page_attachments_alter(&$page) {
12   // Remove the HTML5 mobile meta-tags.
13   $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'cleartype'];
14   foreach ($page['#attached']['html_head'] as $index => $parts) {
15     if (in_array($parts[1], $meta_tags_to_remove)) {
16       unset($page['#attached']['html_head'][$index]);
17     }
18   }
19
20 }