root / drupal7 / sites / all / themes / bootstrap / theme / system / html-tag.vars.php @ 87dbc3bf
1 | 87dbc3bf | Benjamin Luce | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * html-tag.vars.php
|
||
5 | */
|
||
6 | |||
7 | /**
|
||
8 | * Implements hook_process_html_tag().
|
||
9 | */
|
||
10 | function bootstrap_process_html_tag(&$variables) { |
||
11 | $tag = &$variables['element']; |
||
12 | if ($tag['#tag'] == 'style' || $tag['#tag'] == 'script') { |
||
13 | // Remove redundant type attribute and CDATA comments.
|
||
14 | unset($tag['#attributes']['type'], $tag['#value_prefix'], $tag['#value_suffix']); |
||
15 | // Remove media="all" but leave others unaffected.
|
||
16 | if (isset($tag['#attributes']['media']) && $tag['#attributes']['media'] === 'all') { |
||
17 | unset($tag['#attributes']['media']); |
||
18 | } |
||
19 | } |
||
20 | } |