How to alter HTML generated for $messages? I'm building a theme from scratch using Bootstrap 3. I really don't like the HTML being generated for Drupal's $messages. I know I could change the look by using CSS. But I want more control than that, I want to generate different HTML based on type of message (warning, error, etc). I've custom classes &amp; custom images &amp; other custom elements to be used for these messages. I want complete control over the messages. What should I do?
You just need to override the theme function...

theme_status_messages($variables)

https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_status_messages/7

function YOURTHEME_status_messages($variables) {
// code goes here...
}