Skip to content

Instantly share code, notes, and snippets.

@ericjgruber
Created July 2, 2015 13:51
Show Gist options
  • Save ericjgruber/193b50c898d2a4855227 to your computer and use it in GitHub Desktop.
Save ericjgruber/193b50c898d2a4855227 to your computer and use it in GitHub Desktop.
Viewport metatag
/**
* Implements hook_preprocess_htm().
*/
function HOOK_preprocess_html(&$variables) {
$viewport = array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'viewport',
'content' => 'width=device-width, initial-scale=1, maximum-scale=1'));
drupal_add_html_head($viewport, 'viewport');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment