drupal_set_title

Versions
4.6 – 6
drupal_set_title($title = NULL)
7
drupal_set_title($title = NULL, $output = CHECK_PLAIN)

Set the title of the current page, for display on the page and in the title bar.

Parameters

$title Optional string value to assign to the page title; or if set to NULL (default), leaves the current title unchanged.

$output Optional flag - normally should be left as CHECK_PLAIN. Only set to PASS_THROUGH if you have already removed any possibly dangerous code from $title using a function like check_plain() or filter_xss(). With this flag the string will be passed through unchanged.

Return value

The updated title of the current page.

▾ 49 functions call drupal_set_title()

aggregator_page_source in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the items captured from a particular feed.
authorize_access_denied_page in ./authorize.php
Render a 403 access denied page for authorize.php
authorize_run_operation in includes/authorize.inc
Run the operation specified in $_SESSION['authorize_operation']
block_admin_configure in modules/block/block.admin.inc
Menu callback; displays the block configuration form.
blog_page_user in modules/blog/blog.pages.inc
Menu callback; displays a Drupal page containing recent blog entries of a given user.
book_admin_edit in modules/book/book.admin.inc
Build the form to administrate the hierarchy of a single book.
book_outline in modules/book/book.pages.inc
Menu callback; show the outline form for a single node.
comment_preview in modules/comment/comment.module
Generate a comment preview.
confirm_form in modules/system/system.module
Output a confirmation form
contact_personal_form in modules/contact/contact.pages.inc
Form builder; the personal contact form.
drupal_deliver_html_page in includes/common.inc
Package and send the result of a page callback to the browser as a normal HTML page.
drupal_get_title in includes/path.inc
Get the title of the current page, for display on the page and in the title bar.
example_profile_tasks in developer/example.profile
Perform any final installation tasks for this profile.
field_test_entity_add in modules/simpletest/tests/field_test.module
field_test_entity_edit in modules/simpletest/tests/field_test.module
field_ui_field_edit_form in modules/field_ui/field_ui.admin.inc
Menu callback; presents the field instance edit page.
filter_admin_configure_page in modules/filter/filter.admin.inc
Menu callback; display settings defined by a format's filters.
filter_admin_format_page in modules/filter/filter.admin.inc
Menu callback; Display a text format form.
filter_admin_order_page in modules/filter/filter.admin.inc
Menu callback; display form for ordering filters for a format.
help_page in modules/help/help.admin.inc
Menu callback; prints a page listing general help for a module.
image_effect_form in modules/image/image.admin.inc
Form builder; Form for adding and editing image effects.
image_style_form in modules/image/image.admin.inc
Form builder; Edit an image style name and effects order.
node_add in modules/node/node.pages.inc
Present a node submission form or a set of links to such forms.
node_page_default in modules/node/node.module
Menu callback; Generate a listing of promoted nodes.
node_page_edit in modules/node/node.pages.inc
Menu callback; presents the node editing form, or redirects to delete confirmation.
node_page_view in modules/node/node.module
Menu callback; view a single node.
node_preview in modules/node/node.pages.inc
Generate a node preview.
node_revision_overview in modules/node/node.pages.inc
Generate an overview table of older revisions of a node.
node_show in modules/node/node.module
Generate an array which displays a node detail page.
path_admin_edit in modules/path/path.admin.inc
Menu callback; handles pages for creating and editing URL aliases.
poll_results in modules/poll/poll.pages.inc
Callback for the 'results' tab for polls you can vote on
poll_votes in modules/poll/poll.pages.inc
Callback for the 'votes' tab for polls you can see other votes on
profile_browse in modules/profile/profile.pages.inc
Menu callback; display a list of user information.
profile_field_form in modules/profile/profile.admin.inc
Menu callback: Generate a form to add/edit a user profile field.
shortcut_link_add in modules/shortcut/shortcut.admin.inc
Menu callback; Build the form for adding a new shortcut link.
shortcut_link_edit in modules/shortcut/shortcut.admin.inc
Menu callback; Build the form for editing a shortcut link.
statistics_node_tracker in modules/statistics/statistics.pages.inc
statistics_top_pages in modules/statistics/statistics.admin.inc
Menu callback; presents the "top pages" page.
statistics_top_referrers in modules/statistics/statistics.admin.inc
Menu callback; presents the "referrer" page.
statistics_top_visitors in modules/statistics/statistics.admin.inc
Menu callback; presents the "top visitors" page.
statistics_user_tracker in modules/statistics/statistics.pages.inc
template_preprocess_forums in modules/forum/forum.module
Process variables for forums.tpl.php
tracker_page in modules/tracker/tracker.pages.inc
Menu callback; prints a listing of active nodes on the site.
translation_node_overview in modules/translation/translation.pages.inc
Overview page for a node's translations.
_batch_do in includes/batch.inc
Do one pass of execution in JavaScript-mode and return progress to the browser.
_batch_progress_page_js in includes/batch.inc
Output a batch processing page with JavaScript support.
_batch_progress_page_nojs in includes/batch.inc
Output a batch processing page without JavaScript support.
_db_error_page in includes/database/database.inc
Prints a themed maintenance page with the 'Site offline' text, adding the provided error message in the case of 'display_errors' set to on. Ends the page request; no return.
_drupal_log_error in includes/common.inc
Log a PHP error or exception, display an error page in fatal cases.

Code

includes/path.inc, line 295

<?php
function drupal_set_title($title = NULL, $output = CHECK_PLAIN) {
  $stored_title = &drupal_static(__FUNCTION__);

  if (isset($title)) {
    $stored_title = ($output == PASS_THROUGH) ? $title : check_plain($title);
  }

  return $stored_title;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.