function blog_page_title_alter in Page Title 8.2
Same name and namespace in other branches
- 6.2 modules/blog.page_title.inc \blog_page_title_alter()
- 7.2 modules/blog.page_title.inc \blog_page_title_alter()
Implements hook_page_title_alter().
File
- modules/
blog.page_title.inc, line 12 - Blog implementations of the page title hooks
Code
function blog_page_title_alter(&$title) {
$menu_item = menu_get_item();
// If we're looking at a users blog page, get the user title
if (!strncmp($menu_item['path'], 'blog/%', 6) && ($user = menu_get_object('user_uid_optional'))) {
if (variable_get('page_title_blog_showfield', 0) && ($blog_title = page_title_load_title(arg(1), 'user'))) {
$title = $blog_title;
}
}
}