Version 1
[yaffs-website] / web / core / modules / system / tests / modules / system_module_test / system_module_test.module
diff --git a/web/core/modules/system/tests/modules/system_module_test/system_module_test.module b/web/core/modules/system/tests/modules/system_module_test/system_module_test.module
new file mode 100644 (file)
index 0000000..69c9294
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Provides System module hook implementations for testing purposes.
+ */
+
+/**
+ * Implements hook_page_attachments_alter().
+ */
+function system_module_test_page_attachments_alter(&$page) {
+  // Remove the HTML5 mobile meta-tags.
+  $meta_tags_to_remove = ['MobileOptimized', 'HandheldFriendly', 'viewport', 'cleartype'];
+  foreach ($page['#attached']['html_head'] as $index => $parts) {
+    if (in_array($parts[1], $meta_tags_to_remove)) {
+      unset($page['#attached']['html_head'][$index]);
+    }
+  }
+
+}