You are here

function simplemeta_preprocess_html in Simple Meta 7.2

Same name and namespace in other branches
  1. 8.2 simplemeta.module \simplemeta_preprocess_html()
  2. 8 simplemeta.module \simplemeta_preprocess_html()
  3. 7 simplemeta.module \simplemeta_preprocess_html()

Implements $module_preprocess_$hook().

File

./simplemeta.module, line 153
SimpleMeta module.

Code

function simplemeta_preprocess_html(&$vars) {
  global $language;
  if ($meta = simplemeta_get_page_meta(current_path(), $language->language)) {
    $content = $meta->content;

    // Set page title.
    if (isset($content['title']) && ($rendered = drupal_render($content['title']))) {
      $vars['head_title'] = $rendered;
    }
  }
}