You are here

function page_title_tokens in Page Title 7

Same name and namespace in other branches
  1. 8.2 page_title.tokens.inc \page_title_tokens()
  2. 7.2 page_title.tokens.inc \page_title_tokens()

Implement hook_token_values().

Parameters

string The type of token being generated:

Return value

array An array of Token ID and Token Value pairs

File

./page_title.module, line 515
Enhanced control over the page title (in the head tag).

Code

function page_title_tokens($type, $tokens, $data, $language = NULL, $sanitize = TRUE) {
  $replacements = array();
  if ($type == 'site' && isset($tokens['page-title'])) {
    $replacements[$tokens['page-title']] = page_title_get_title();
  }
  return $replacements;
}