-
Notifications
You must be signed in to change notification settings - Fork 0
/
saplings_child.theme
58 lines (55 loc) · 2.82 KB
/
saplings_child.theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* @file
* Functions to support theming in the Saplings Child theme.
*/
/**
* Implements hook_library_info_alter().
*
* @todo Workaround for https://www.drupal.org/node/2642122.
*/
function saplings_child_library_info_alter(array &$libraries, $extension) {
if ($extension == 'system' && isset($libraries['base'])) {
unset($libraries['base']['css']['component']['css/components/ajax-progress.module.css']);
unset($libraries['base']['css']['component']['css/components/align.module.css']);
unset($libraries['base']['css']['component']['css/components/autocomplete-loading.module.css']);
unset($libraries['base']['css']['component']['css/components/fieldgroup.module.css']);
unset($libraries['base']['css']['component']['css/components/container-inline.module.css']);
unset($libraries['base']['css']['component']['css/components/clearfix.module.css']);
unset($libraries['base']['css']['component']['css/components/details.module.css']);
// unset($libraries['base']['css']['component']['css/components/hidden.module.css']);.
unset($libraries['base']['css']['component']['css/components/item-list.module.css']);
unset($libraries['base']['css']['component']['css/components/js.module.css']);
unset($libraries['base']['css']['component']['css/components/nowrap.module.css']);
unset($libraries['base']['css']['component']['css/components/position-container.module.css']);
unset($libraries['base']['css']['component']['css/components/progress.module.css']);
unset($libraries['base']['css']['component']['css/components/reset-appearance.module.css']);
unset($libraries['base']['css']['component']['css/components/resize.module.css']);
unset($libraries['base']['css']['component']['css/components/sticky-header.module.css']);
unset($libraries['base']['css']['component']['css/components/system-status-counter.css']);
unset($libraries['base']['css']['component']['css/components/system-status-report-counters.css']);
unset($libraries['base']['css']['component']['css/components/system-status-report-general-info.css']);
unset($libraries['base']['css']['component']['css/components/tabledrag.module.css']);
unset($libraries['base']['css']['component']['css/components/tablesort.module.css']);
unset($libraries['base']['css']['component']['css/components/tree-child.module.css']);
}
}
/**
* Implements hook_page_attachments_alter().
*/
function saplings_child_page_attachments_alter(&$page) {
// Remove the HTML5 mobile meta-tags.
$meta_tags_to_remove = [
'system_meta_content_type',
'system_meta_generator',
'MobileOptimized',
'HandheldFriendly',
'cleartype',
];
// Unset loop.
foreach ($page['#attached']['html_head'] as $index => $parts) {
if (in_array($parts[1], $meta_tags_to_remove)) {
unset($page['#attached']['html_head'][$index]);
}
}
}