Skip to content
Snippets Groups Projects
Commit 33a4cbe4 authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

Switch to using token_replace_multiple rather than multiple calls to token_replace

parent b4f50f13
No related branches found
No related tags found
No related merge requests found
......@@ -318,12 +318,19 @@ function page_title_page_get_title() {
$title = variable_get('page_title_default', '[page-title] | [site-name]');
}
//Define Token Types array
$types = array();
//Return the title using the node scope if node is set, and then add our scope replacements
if (isset($node)) {
$title = token_replace($title, 'node', $node);
$types['node'] = $node;
}
$title = token_replace($title, 'page_title');
//Finally, the page_title fallback
$types['page_title'] = NULL;
//Apply token patterns using token_replace_multiple
$title = token_replace_multiple($title, $types);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment