drupal_set_title

  1. drupal
    1. 5 path.inc
    2. 6 path.inc
    3. 7
    4. 8
Versions
5 – 6 drupal_set_title($title = NULL)
8 – 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.

▾ 67 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
Renders 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
Form builder for 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_edit_page in modules/comment/comment.module
Page callback for comment editing.
comment_preview in modules/comment/comment.module
Generate a comment preview.
confirm_form in modules/system/system.module
Generates a form array for 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 HTML.
drupal_get_title in includes/bootstrap.inc
Get the title of the current page, for display on the page and in the title bar.
example_profile_tasks in documentation/developer/example.profile
Perform any final installation tasks for this profile.
field_test_entity_add in modules/field/tests/field_test.entity.inc
Menu callback: displays the 'Add new test_entity' form.
field_test_entity_edit in modules/field/tests/field_test.entity.inc
Menu callback: displays the 'Edit exiisting test_entity' form.
field_ui_field_edit_form in modules/field_ui/field_ui.admin.inc
Menu callback; presents the field instance edit page.
field_ui_field_settings_form in modules/field_ui/field_ui.admin.inc
Menu callback; presents the field settings edit page.
field_ui_widget_type_form in modules/field_ui/field_ui.admin.inc
Menu callback; select a widget for the field.
filter_admin_format_page in modules/filter/filter.admin.inc
Menu callback; Display a text format form.
form_example_wizard in examples/form_example/form_example_wizard.inc
The primary formbuilder function for the wizard form. This is the form that you should call with drupal_get_form() from your code, and it will include the rest of the step forms defined. You are not required to change this function, as this will…
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.
install_already_done_error in includes/install.core.inc
Indicates that Drupal has already been installed.
install_configure_form in includes/install.core.inc
Installation task; configure settings for the new site.
install_finished in includes/install.core.inc
Installation task; perform final steps and display a 'finished' page.
install_no_profile_error in includes/install.core.inc
Indicates that there are no profiles available.
install_select_locale in includes/install.core.inc
Installation task; select which locale to use for the current profile.
install_select_profile in includes/install.core.inc
Installation task; select which profile to install.
install_settings_form in includes/install.core.inc
Installation task; define a form to configure and rewrite settings.php.
install_verify_requirements in includes/install.core.inc
Installation task; verify the requirements for installing Drupal.
node_add in modules/node/node.pages.inc
Returns a node submission form.
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.
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.
openid_user_identities in modules/openid/openid.pages.inc
Menu callback; Manage OpenID identities for the specified user.
PageTitleFiltering::tearDown in modules/system/system.test
Reset page title.
PageTitleFiltering::testTitleTags in modules/system/system.test
Tests the handling of HTML by drupal_set_title() and drupal_get_title()
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
Form callback: builds the form for adding a new shortcut link.
shortcut_link_edit in modules/shortcut/shortcut.admin.inc
Form callback: builds 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.
update_access_denied_page in ./update.php
update_check_requirements in ./update.php
Check update requirements and report any errors.
update_info_page in ./update.php
update_results_page in ./update.php
update_selection_page in ./update.php
_batch_do in includes/batch.inc
Do one execution pass 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.
_drupal_bootstrap_page_cache in includes/bootstrap.inc
Bootstrap page cache: Try to serve a page from cache.
_drupal_log_error in includes/errors.inc
Log a PHP error or exception, display an error page in fatal cases.

Code

includes/bootstrap.inc, line 1789

<?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;
}
?>