Same name and namespace in other branches
  1. 4.6.x includes/bootstrap.inc \drupal_get_title()
  2. 4.7.x includes/path.inc \drupal_get_title()
  3. 5.x includes/path.inc \drupal_get_title()
  4. 6.x includes/path.inc \drupal_get_title()

Gets the title of the current page.

The title is displayed on the page and in the title bar.

Return value

The current page's title.

8 calls to drupal_get_title()
drupal_page_set_cache in includes/common.inc
Stores the current page in the cache.
PageTitleFiltering::setUp in modules/system/system.test
Implement setUp().
PageTitleFiltering::testTitleTags in modules/system/system.test
Tests the handling of HTML by drupal_set_title() and drupal_get_title()
shortcut_preprocess_page in modules/shortcut/shortcut.module
Implements hook_preprocess_page().
template_preprocess_html in includes/theme.inc
Preprocess variables for html.tpl.php

... See full list

File

includes/bootstrap.inc, line 2193
Functions that need to be loaded on every Drupal request.

Code

function drupal_get_title() {
  $title = drupal_set_title();

  // During a bootstrap, menu.inc is not included and thus we cannot provide a title.
  if (!isset($title) && function_exists('menu_get_active_title')) {
    $title = check_plain(menu_get_active_title());
  }
  return $title;
}