You are here

function context_metadata_page_title_alter in Context Metadata 6

Implements hook_page_title_alter().

File

./context_metadata.module, line 51
Provides a context reaction

Code

function context_metadata_page_title_alter(&$title) {
  $static_metadata_array = context_metadata_static_store();
  if (isset($static_metadata_array['metadata_title'])) {
    if (module_exists('token')) {
      $title = token_replace($static_metadata_array['metadata_title'], $type = 'global', $object = NULL, $leading = '[', $trailing = ']');
    }
    else {
      $title = $static_metadata_array['metadata_title'];
    }
  }
}