Commit 8456c626 authored by Dries's avatar Dries

- Patch #1616896 by Rob Loach: remove ().

parent 67af8a49
......@@ -2546,8 +2546,40 @@ function template_preprocess_html(&$variables) {
$variables['head_title_array'] = $head_title;
$variables['head_title'] = implode(' | ', $head_title);
// Display the html.tpl.php’s default mobile metatags for responsive design.
$variables['default_mobile_metatags'] = TRUE;
// Display the html.tpl.php's default mobile metatags for responsive design.
$elements = array(
'MobileOptimized' => array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'MobileOptimized',
'content' => 'width',
),
),
'HandheldFriendly' => array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'HandheldFriendly',
'content' => 'true',
),
),
'viewport' => array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'viewport',
'content' => 'width=device-width',
),
),
'cleartype' => array(
'#tag' => 'meta',
'#attributes' => array(
'http-equiv' => 'cleartype',
'content' => 'on',
),
),
);
foreach ($elements as $name => $element) {
drupal_add_html_head($element, $name);
}
// Populate the page template suggestions.
if ($suggestions = theme_get_suggestions(arg(), 'html')) {
......
......@@ -22,8 +22,6 @@
* - slogan: The slogan of the site, if any, and if there is no title.
* - $head: Markup for the HEAD section (including meta tags, keyword tags, and
* so on).
* - $default_mobile_metatags: TRUE if default mobile metatags for responsive
* design should be displayed.
* - $styles: Style tags necessary to import all CSS files for the page.
* - $scripts: Script tags necessary to load the JavaScript files and settings
* for the page.
......@@ -45,12 +43,6 @@
<html<?php print $html_attributes; ?>>
<head>
<?php print $head; ?>
<?php if ($default_mobile_metatags): ?>
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="cleartype" content="on" />
<?php endif; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
......
......@@ -5,6 +5,13 @@
* Provides System module hook implementations for testing purposes.
*/
function system_module_test_preprocess_html(&$variables) {
$variables['default_mobile_metatags'] = FALSE;
/**
* Implements hook_html_head_alter().
*/
function system_module_test_html_head_alter(&$head_elements) {
// Remove the HTML5 mobile meta-tags.
unset($head_elements['MobileOptimized']);
unset($head_elements['HandheldFriendly']);
unset($head_elements['viewport']);
unset($head_elements['cleartype']);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment