Skip to content

Instantly share code, notes, and snippets.

@philwolstenholme
Created April 26, 2015 12:13
Show Gist options
  • Save philwolstenholme/203c586fdfd99169c3c4 to your computer and use it in GitHub Desktop.
Save philwolstenholme/203c586fdfd99169c3c4 to your computer and use it in GitHub Desktop.
Add a theme-color meta tag to your Drupal site (within your theme's template.php)
/*
* Implements template_preprocess_html()
* Preprocess variables for the html template file.
*
*/
function YOUR_THEME_NAME_preprocess_html(&$variables) {
$android5_theme_color = array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
'name' => 'theme-color',
'content' => '#1A237E',
)
);
drupal_add_html_head($android5_theme_color, 'android5_theme_color');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment