You are here

function page_title_get_title in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 page_title.module \page_title_get_title()
  2. 5.2 page_title.module \page_title_get_title()
  3. 6.2 page_title.module \page_title_get_title()
  4. 6 page_title.module \page_title_get_title()
  5. 7 page_title.module \page_title_get_title()

Simple wrapper function to get the currently set title for a page

Parameters

$raw: Optionally set the function to return a result not cleaned by filter_xss. This should be used with caution.

Return value

string the title for the current page

1 call to page_title_get_title()
page_title_tokens in ./page_title.tokens.inc
Implements hook_token_values().

File

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

Code

function page_title_get_title($raw = FALSE, $flush = FALSE) {
  $title =& drupal_static(__FUNCTION__);
  if ($flush || is_null($title)) {

    // Give other modules the oppertunity to use hook_page_title_alter().
    drupal_alter('page_title', $title);
  }

  // Return the title
  return $raw ? $title : filter_xss($title, array());
}