I wanted to add some data to the page head title and created a template_preprocess_html function in my module.
I added a couple entries to the head_title_array and imploded the array back into head_title.
At first it looked like it wasnt working at all, but then I checked and in html.tpl.php the $head_title_array was updated.
My temp solution is to implode the array there before printing it but that's a little hackish for me.
Thoughts on where the title is being set or re-set to prevent it from being changed in template_preprocess_html?
Module code is aproximately:
function MODULE_preprocess_html(&$variables) {
$head_title = $variables['head_title_array'];
array_unshift($head_title, 'TEST');
$variables['head_title_array'] = $head_title;
$variables['head_title'] = implode(' | ', $head_title);
}
and in html.tpl.php:
<title><?php print implode(' | ', $head_title_array); ?></title>
I just noticed that the metadata module is storing variables in an array called metatag_set_preprocess_variable. That might be the cause, I'll investigate further.