You are here

function context_metadata_preprocess_html in Context Metadata 7

Implements hook_preprocess_html()

Parameters

$vars:

File

./context_metadata.module, line 59

Code

function context_metadata_preprocess_html(&$vars) {
  $metadata = drupal_static('metadata_array');
  if (isset($metadata['metadata_title'])) {
    $token_title = token_replace($metadata['metadata_title']);
    if (!empty($token_title)) {
      $vars['head_title'] = $token_title;
      $vars['head_array']['title'] = $token_title;
    }
  }
}