For testing purposes, I'm trying to manually add a message to the $messages
array, in either process or preprocess page function. To be clear, I first tried using
template.php -> mytheme_preprocess_page (&$vars) {}
but then I realized there's no $messages
array there, so instead I am doing it via process.page.inc.
The code I have tried, which is not working is:
function mytheme_process_page(&$variables) {
$variables[messages][] = 'new test message';
kpr($variables);
}
I have tried some variations on this, but nothing worked.