function page_title_get_title in Page Title 6
Same name and namespace in other branches
- 8.2 page_title.module \page_title_get_title()
- 5.2 page_title.module \page_title_get_title()
- 6.2 page_title.module \page_title_get_title()
- 7.2 page_title.module \page_title_get_title()
- 7 page_title.module \page_title_get_title()
Simple wrapper function to get the currently set title for a page
Return value
unknown
1 call to page_title_get_title()
- page_title_token_values in ./
page_title.module - Implementation of hook_token_values
File
- ./
page_title.module, line 245 - Enhanced control over the page title (in the head tag).
Code
function page_title_get_title() {
$display_options = variable_get('page_title_display', array());
$node = arg(0) == 'node' && is_numeric(arg(1)) ? node_load(arg(1)) : NULL;
if ($display_options[$node->type] && !empty($node->page_title)) {
return check_plain(strip_tags($node->page_title));
}
else {
return strip_tags(drupal_get_title());
}
}